Added initial support for new style threads launch method.

This commit is contained in:
XMRig 2019-07-16 22:10:50 +07:00
parent dff59fabc2
commit 27f3008d79
32 changed files with 1429 additions and 505 deletions

View file

@ -202,6 +202,9 @@ static void patchAsmVariants()
#endif
static const xmrig::CnHash cnHash;
xmrig::CnHash::CnHash()
{
ADD_FN(Algorithm::CN_0);
@ -252,18 +255,18 @@ xmrig::CnHash::CnHash()
}
xmrig::cn_hash_fun xmrig::CnHash::fn(const Algorithm &algorithm, AlgoVariant av, Assembly::Id assembly) const
xmrig::cn_hash_fun xmrig::CnHash::fn(const Algorithm &algorithm, AlgoVariant av, Assembly::Id assembly)
{
if (!algorithm.isValid()) {
return nullptr;
}
# ifdef XMRIG_FEATURE_ASM
cn_hash_fun fun = m_map[algorithm][av][assembly == Assembly::AUTO ? Cpu::info()->assembly() : assembly];
cn_hash_fun fun = cnHash.m_map[algorithm][av][assembly == Assembly::AUTO ? Cpu::info()->assembly() : assembly];
if (fun) {
return fun;
}
# endif
return m_map[algorithm][av][Assembly::NONE];
return cnHash.m_map[algorithm][av][Assembly::NONE];
}

View file

@ -65,7 +65,7 @@ public:
CnHash();
cn_hash_fun fn(const Algorithm &algorithm, AlgoVariant av, Assembly::Id assembly) const;
static cn_hash_fun fn(const Algorithm &algorithm, AlgoVariant av, Assembly::Id assembly);
private:
cn_hash_fun m_map[Algorithm::MAX][AV_MAX][Assembly::MAX] = {};