Added classes IOclRunner, OclBaseRunner, OclCnRunner, OclRxRunner.

This commit is contained in:
XMRig 2019-08-26 04:44:01 +07:00
parent 27e862da62
commit 47b8cb6044
14 changed files with 565 additions and 6 deletions

View file

@ -79,6 +79,55 @@ public:
return 0;
}
inline static uint32_t iterations(Algorithm::Id algo)
{
switch (algo) {
case Algorithm::CN_0:
case Algorithm::CN_1:
case Algorithm::CN_2:
case Algorithm::CN_R:
case Algorithm::CN_WOW:
case Algorithm::CN_RTO:
return CN_ITER;
case Algorithm::CN_FAST:
case Algorithm::CN_HALF:
# ifdef XMRIG_ALGO_CN_LITE
case Algorithm::CN_LITE_0:
case Algorithm::CN_LITE_1:
# endif
# ifdef XMRIG_ALGO_CN_HEAVY
case Algorithm::CN_HEAVY_0:
case Algorithm::CN_HEAVY_TUBE:
case Algorithm::CN_HEAVY_XHV:
# endif
return CN_ITER / 2;
case Algorithm::CN_RWZ:
case Algorithm::CN_ZLS:
return 0x60000;
case Algorithm::CN_XAO:
case Algorithm::CN_DOUBLE:
return CN_ITER * 2;
# ifdef XMRIG_ALGO_CN_GPU
case Algorithm::CN_GPU:
return 0xC000;
# endif
# ifdef XMRIG_ALGO_CN_PICO
case Algorithm::CN_PICO_0:
return CN_ITER / 8;
default:
break;
}
# endif
return 0;
}
inline static uint32_t mask(Algorithm::Id algo)
{
# ifdef XMRIG_ALGO_CN_GPU
@ -188,6 +237,7 @@ private:
# endif
};
constexpr const static uint32_t m_iterations[] = {
CN_ITER, // CN_0
CN_ITER, // CN_1