mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-22 18:54:43 +00:00
Merge branch 'Spudz76-dev-rxv' into dev
This commit is contained in:
commit
81b1cccb0b
9 changed files with 34 additions and 9 deletions
|
@ -25,9 +25,9 @@
|
|||
|
||||
|
||||
#include "backend/opencl/OclLaunchData.h"
|
||||
|
||||
#include "backend/common/Tags.h"
|
||||
#include "backend/opencl/OclConfig.h"
|
||||
#include "crypto/rx/RxAlgo.h"
|
||||
|
||||
|
||||
xmrig::OclLaunchData::OclLaunchData(const Miner *miner, const Algorithm &algorithm, const OclConfig &config, const OclPlatform &platform, const OclThread &thread, const OclDevice &device, int64_t affinity) :
|
||||
|
@ -44,7 +44,7 @@ xmrig::OclLaunchData::OclLaunchData(const Miner *miner, const Algorithm &algorit
|
|||
|
||||
bool xmrig::OclLaunchData::isEqual(const OclLaunchData &other) const
|
||||
{
|
||||
return (other.algorithm == algorithm &&
|
||||
return (RxAlgo::id(other.algorithm) == RxAlgo::id(algorithm) &&
|
||||
other.thread == thread);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#define ALGO_RX_LOKI 20
|
||||
#define ALGO_RX_ARQMA 21
|
||||
#define ALGO_RX_SFX 22
|
||||
#define ALGO_AR2_CHUKWA 23
|
||||
#define ALGO_AR2_WRKZ 24
|
||||
#define ALGO_RX_V 23
|
||||
#define ALGO_AR2_CHUKWA 24
|
||||
#define ALGO_AR2_WRKZ 25
|
||||
|
||||
#define FAMILY_UNKNOWN 0
|
||||
#define FAMILY_CN 1
|
||||
|
|
|
@ -56,10 +56,7 @@ xmrig::OclRxBaseRunner::OclRxBaseRunner(size_t index, const OclLaunchData &data)
|
|||
m_gcn_version = 14;
|
||||
}
|
||||
|
||||
// rx/sfx is the same as rx/0 except Argon salt for dataset generation
|
||||
Algorithm::Id id = (m_algorithm.id() == Algorithm::RX_SFX) ? Algorithm::RX_0 : m_algorithm.id();
|
||||
|
||||
m_options += " -DALGO=" + std::to_string(id);
|
||||
m_options += " -DALGO=" + std::to_string(RxAlgo::id(m_algorithm));
|
||||
m_options += " -DWORKERS_PER_HASH=" + std::to_string(m_worksize);
|
||||
m_options += " -DGCN_VERSION=" + std::to_string(m_gcn_version);
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ static AlgoName const algorithm_names[] = {
|
|||
{ "RandomARQ", nullptr, Algorithm::RX_ARQ },
|
||||
{ "randomx/sfx", "rx/sfx", Algorithm::RX_SFX },
|
||||
{ "RandomSFX", nullptr, Algorithm::RX_SFX },
|
||||
{ "RandomV", "rx/v", Algorithm::RX_V },
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
{ "argon2/chukwa", nullptr, Algorithm::AR2_CHUKWA },
|
||||
|
@ -141,6 +142,7 @@ size_t xmrig::Algorithm::l2() const
|
|||
case RX_0:
|
||||
case RX_LOKI:
|
||||
case RX_SFX:
|
||||
case RX_V:
|
||||
return 0x40000;
|
||||
|
||||
case RX_WOW:
|
||||
|
@ -177,6 +179,7 @@ size_t xmrig::Algorithm::l3() const
|
|||
case RX_0:
|
||||
case RX_LOKI:
|
||||
case RX_SFX:
|
||||
case RX_V:
|
||||
return oneMiB * 2;
|
||||
|
||||
case RX_WOW:
|
||||
|
@ -277,6 +280,7 @@ xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
|||
case RX_LOKI:
|
||||
case RX_ARQ:
|
||||
case RX_SFX:
|
||||
case RX_V:
|
||||
return RANDOM_X;
|
||||
# endif
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ public:
|
|||
RX_LOKI, // "rx/loki" RandomXL (Loki).
|
||||
RX_ARQ, // "rx/arq" RandomARQ (Arqma).
|
||||
RX_SFX, // "rx/sfx" RandomSFX (Safex Cash).
|
||||
RX_V, // "rx/v" RandomV (Monerov).
|
||||
AR2_CHUKWA, // "argon2/chukwa" Argon2id (Chukwa).
|
||||
AR2_WRKZ, // "argon2/wrkz" Argon2id (WRKZ)
|
||||
MAX
|
||||
|
|
|
@ -97,6 +97,11 @@ RandomX_ConfigurationSafex::RandomX_ConfigurationSafex()
|
|||
ArgonSalt = "RandomSFX\x01";
|
||||
}
|
||||
|
||||
RandomX_ConfigurationV::RandomX_ConfigurationV()
|
||||
{
|
||||
ArgonSalt = "RandomV\x03";
|
||||
}
|
||||
|
||||
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
||||
: ArgonMemory(262144)
|
||||
, ArgonIterations(3)
|
||||
|
@ -273,6 +278,7 @@ RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
|||
RandomX_ConfigurationLoki RandomX_LokiConfig;
|
||||
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||
RandomX_ConfigurationV RandomX_VConfig;
|
||||
|
||||
RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -183,12 +183,14 @@ struct RandomX_ConfigurationWownero : public RandomX_ConfigurationBase { RandomX
|
|||
struct RandomX_ConfigurationLoki : public RandomX_ConfigurationBase { RandomX_ConfigurationLoki(); };
|
||||
struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_ConfigurationArqma(); };
|
||||
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
||||
struct RandomX_ConfigurationV : public RandomX_ConfigurationBase { RandomX_ConfigurationV(); };
|
||||
|
||||
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
||||
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
||||
extern RandomX_ConfigurationLoki RandomX_LokiConfig;
|
||||
extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||
extern RandomX_ConfigurationV RandomX_VConfig;
|
||||
|
||||
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -37,6 +37,16 @@ xmrig::Algorithm::Id xmrig::RxAlgo::apply(Algorithm::Id algorithm)
|
|||
}
|
||||
|
||||
|
||||
xmrig::Algorithm::Id xmrig::RxAlgo::id(Algorithm::Id algorithm)
|
||||
{
|
||||
if (algorithm == Algorithm::RX_SFX || algorithm == Algorithm::RX_V) {
|
||||
return Algorithm::RX_0;
|
||||
}
|
||||
|
||||
return algorithm;
|
||||
}
|
||||
|
||||
|
||||
const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
||||
{
|
||||
switch (algorithm) {
|
||||
|
@ -52,6 +62,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
|||
case Algorithm::RX_SFX:
|
||||
return &RandomX_SafexConfig;
|
||||
|
||||
case Algorithm::RX_V:
|
||||
return &RandomX_VConfig;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ class RxAlgo
|
|||
{
|
||||
public:
|
||||
static Algorithm::Id apply(Algorithm::Id algorithm);
|
||||
static Algorithm::Id id(Algorithm::Id algorithm);
|
||||
static const RandomX_ConfigurationBase *base(Algorithm::Id algorithm);
|
||||
static uint32_t programCount(Algorithm::Id algorithm);
|
||||
static uint32_t programIterations(Algorithm::Id algorithm);
|
||||
|
|
Loading…
Reference in a new issue