"xmrig::cn_uses_variant1" replaced to "xmrig::cn_base_variant".

This commit is contained in:
XMRig 2018-09-10 18:35:12 +03:00
parent bb3990a076
commit 23914e9a9f
3 changed files with 17 additions and 17 deletions

View file

@ -432,7 +432,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 32);
@ -544,7 +544,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 64);

View file

@ -151,16 +151,16 @@ inline uint32_t cn_select_iter(Algo algorithm, Variant variant)
}
template<Variant variant> inline constexpr bool cn_uses_variant1() { return false; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_0>() { return false; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_1>() { return true; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_TUBE>() { return true; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_XTL>() { return true; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_MSR>() { return true; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_XHV>() { return false; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_XAO>() { return false; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_RTO>() { return true; }
template<> inline constexpr bool cn_uses_variant1<VARIANT_2>() { return false; }
template<Variant variant> inline constexpr Variant cn_base_variant() { return VARIANT_0; }
template<> inline constexpr Variant cn_base_variant<VARIANT_0>() { return VARIANT_0; }
template<> inline constexpr Variant cn_base_variant<VARIANT_1>() { return VARIANT_1; }
template<> inline constexpr Variant cn_base_variant<VARIANT_TUBE>() { return VARIANT_1; }
template<> inline constexpr Variant cn_base_variant<VARIANT_XTL>() { return VARIANT_1; }
template<> inline constexpr Variant cn_base_variant<VARIANT_MSR>() { return VARIANT_1; }
template<> inline constexpr Variant cn_base_variant<VARIANT_XHV>() { return VARIANT_0; }
template<> inline constexpr Variant cn_base_variant<VARIANT_XAO>() { return VARIANT_0; }
template<> inline constexpr Variant cn_base_variant<VARIANT_RTO>() { return VARIANT_1; }
template<> inline constexpr Variant cn_base_variant<VARIANT_2>() { return VARIANT_2; }
} /* namespace xmrig */

View file

@ -456,7 +456,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 32);
@ -567,7 +567,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 64);
@ -833,7 +833,7 @@ inline void cryptonight_triple_hash(const uint8_t *__restrict__ input, size_t si
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 32 * 3);
@ -897,7 +897,7 @@ inline void cryptonight_quad_hash(const uint8_t *__restrict__ input, size_t size
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;;
if (IS_V1 && size < 43) {
memset(output, 0, 32 * 4);
@ -970,7 +970,7 @@ inline void cryptonight_penta_hash(const uint8_t *__restrict__ input, size_t siz
constexpr size_t MASK = xmrig::cn_select_mask<ALGO>();
constexpr size_t ITERATIONS = xmrig::cn_select_iter<ALGO, VARIANT>();
constexpr size_t MEM = xmrig::cn_select_memory<ALGO>();
constexpr bool IS_V1 = xmrig::cn_uses_variant1<VARIANT>();
constexpr bool IS_V1 = xmrig::cn_base_variant<VARIANT>() == xmrig::VARIANT_1;
if (IS_V1 && size < 43) {
memset(output, 0, 32 * 5);