Added maxIntensity method to Algorithm.

This commit is contained in:
XMRig
2019-08-07 18:51:32 +07:00
parent 3af6b81ea2
commit 3c5d27ea09
3 changed files with 23 additions and 24 deletions

View File

@@ -120,6 +120,24 @@ static AlgoName const algorithm_names[] = {
} /* namespace xmrig */
int xmrig::Algorithm::maxIntensity() const
{
# ifdef XMRIG_ALGO_RANDOMX
if (family() == RANDOM_X) {
return 1;
}
# endif
# ifdef XMRIG_ALGO_CN_GPU
if (m_id == CN_GPU) {
return 1;
}
# endif
return 5;
}
rapidjson::Value xmrig::Algorithm::toJSON() const
{
using namespace rapidjson;