Added support for multi-algorithm CPU threads settings.
This commit is contained in:
parent
83fdbbf29c
commit
b92807e8d8
24 changed files with 595 additions and 109 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
|
||||
#include "crypto/cn/CnAlgo.h"
|
||||
#include "crypto/common/Algorithm.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
|
@ -123,6 +124,20 @@ rapidjson::Value xmrig::Algorithm::toJSON() const
|
|||
}
|
||||
|
||||
|
||||
size_t xmrig::Algorithm::memory() const
|
||||
{
|
||||
if (family() < RANDOM_X) {
|
||||
return CnAlgo<>::memory(m_id);
|
||||
}
|
||||
|
||||
if (m_id == RX_WOW) {
|
||||
return 0x100000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
||||
{
|
||||
switch (id) {
|
||||
|
|
|
@ -94,11 +94,14 @@ public:
|
|||
inline Family family() const { return family(m_id); }
|
||||
inline Id id() const { return m_id; }
|
||||
|
||||
inline bool operator!=(Algorithm::Id id) const { return m_id != id; }
|
||||
inline bool operator!=(const Algorithm &other) const { return !isEqual(other); }
|
||||
inline bool operator==(Algorithm::Id id) const { return m_id == id; }
|
||||
inline bool operator==(const Algorithm &other) const { return isEqual(other); }
|
||||
inline operator Algorithm::Id() const { return m_id; }
|
||||
|
||||
rapidjson::Value toJSON() const;
|
||||
size_t memory() const;
|
||||
|
||||
static Family family(Id id);
|
||||
static Id parse(const char *name);
|
||||
|
|
|
@ -59,10 +59,10 @@ public:
|
|||
|
||||
inline bool isEqual(const Assembly &other) const { return m_id == other.m_id; }
|
||||
|
||||
inline bool operator!=(Assembly::Id id) const { return m_id != id; }
|
||||
inline bool operator!=(const Assembly &other) const { return !isEqual(other); }
|
||||
inline bool operator!=(const Assembly::Id &id) const { return m_id != id; }
|
||||
inline bool operator==(Assembly::Id id) const { return m_id == id; }
|
||||
inline bool operator==(const Assembly &other) const { return isEqual(other); }
|
||||
inline bool operator==(const Assembly::Id &id) const { return m_id == id; }
|
||||
inline operator Assembly::Id() const { return m_id; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue