Removed CnAlgo dependency from Algorithm class.

This commit is contained in:
XMRig
2020-04-03 00:25:41 +07:00
parent ee80f9b2c6
commit 48a8608e4a
2 changed files with 18 additions and 23 deletions

View File

@@ -53,24 +53,9 @@ public:
inline static size_t memory(Algorithm::Id algo)
{
switch (Algorithm::family(algo)) {
case Algorithm::CN:
return CN_MEMORY;
Algorithm algorithm(algo);
case Algorithm::CN_LITE:
return CN_MEMORY / 2;
case Algorithm::CN_HEAVY:
return CN_MEMORY * 2;
case Algorithm::CN_PICO:
return CN_MEMORY / 8;
default:
break;
}
return 0;
return algorithm.isCN() ? algorithm.l3() : 0;
}
inline static uint32_t iterations(Algorithm::Id algo)