Implemented new style algorithm definitions (except ARM), removed Algo and Variant enums.
This commit is contained in:
parent
d7f42d54ad
commit
1f0e3e501c
30 changed files with 1223 additions and 1359 deletions
|
@ -63,24 +63,35 @@ public:
|
|||
CN_HEAVY_XHV, // "cn-heavy/xhv" Modified CryptoNight-Heavy (Haven Protocol only)
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
CN_PICO, // "cn-pico" CryptoNight Turtle (TRTL)
|
||||
CN_PICO_0, // "cn-pico" CryptoNight Turtle (TRTL)
|
||||
# endif
|
||||
MAX
|
||||
};
|
||||
|
||||
enum Family : int {
|
||||
UNKNOWN,
|
||||
CN,
|
||||
CN_LITE,
|
||||
CN_HEAVY,
|
||||
CN_PICO
|
||||
};
|
||||
|
||||
inline Algorithm() {}
|
||||
inline Algorithm(const char *algo) : m_id(parse(algo)) {}
|
||||
inline Algorithm(Id id) : m_id(id) {}
|
||||
|
||||
inline bool isEqual(const Algorithm &other) const { return m_id == other.m_id; }
|
||||
inline bool isValid() const { return m_id != INVALID; }
|
||||
inline const char *name() const { return name(false); }
|
||||
inline const char *shortName() const { return name(true); }
|
||||
inline Family family() const { return family(m_id); }
|
||||
inline Id id() const { return m_id; }
|
||||
inline bool isValid() const { return m_id != INVALID; }
|
||||
|
||||
inline bool operator!=(const Algorithm &other) const { return !isEqual(other); }
|
||||
inline bool operator==(const Algorithm &other) const { return isEqual(other); }
|
||||
inline operator Algorithm::Id() const { return m_id; }
|
||||
|
||||
static Family family(Id id);
|
||||
static Id parse(const char *name);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue