mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-14 10:32:38 -05:00
Added maxIntensity method to Algorithm.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
inline bool operator==(const Algorithm &other) const { return isEqual(other); }
|
||||
inline operator Algorithm::Id() const { return m_id; }
|
||||
|
||||
int maxIntensity() const;
|
||||
rapidjson::Value toJSON() const;
|
||||
size_t memory() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user