Implemented stable algorithm ids.
This commit is contained in:
parent
d0a632f557
commit
e6332eff2b
21 changed files with 6349 additions and 6480 deletions
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "backend/common/Threads.h"
|
||||
#include "3rdparty/rapidjson/document.h"
|
||||
#include "backend/cpu/CpuThreads.h"
|
||||
|
@ -125,7 +118,7 @@ xmrig::String xmrig::Threads<T>::profileName(const Algorithm &algorithm, bool st
|
|||
return String();
|
||||
}
|
||||
|
||||
if (algorithm.family() == Algorithm::CN && CnAlgo<>::base(algorithm) == Algorithm::CN_2 && has(kCn2)) {
|
||||
if (algorithm.family() == Algorithm::CN && algorithm.base() == Algorithm::CN_2 && has(kCn2)) {
|
||||
return kCn2;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,6 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef XMRIG_THREADS_H
|
||||
#define XMRIG_THREADS_H
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
||||
|
@ -297,7 +290,7 @@ const xmrig::String &xmrig::CpuBackend::type() const
|
|||
void xmrig::CpuBackend::prepare(const Job &nextJob)
|
||||
{
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
const xmrig::Algorithm::Family f = nextJob.algorithm().family();
|
||||
const auto f = nextJob.algorithm().family();
|
||||
if ((f == Algorithm::ARGON2) || (f == Algorithm::RANDOM_X)) {
|
||||
if (argon2::Impl::select(d_ptr->controller->config()->cpu().argon2Impl())) {
|
||||
LOG_INFO("%s use " WHITE_BOLD("argon2") " implementation " CSI "1;%dm" "%s",
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -309,7 +309,7 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
return 1;
|
||||
}
|
||||
|
||||
Algorithm::Family f = algorithm.family();
|
||||
const auto f = algorithm.family();
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
if (f == Algorithm::CN_LITE) {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef XMRIG_HWLOC_DEBUG
|
||||
# include <uv.h>
|
||||
#endif
|
||||
|
@ -336,7 +335,7 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||
|
||||
size_t cacheHashes = ((L3 + extra) + (scratchpad / 2)) / scratchpad;
|
||||
|
||||
Algorithm::Family family = algorithm.family();
|
||||
const auto family = algorithm.family();
|
||||
if (intensity && ((family == Algorithm::CN_PICO) || (family == Algorithm::CN_FEMTO)) && (cacheHashes / PUs) >= 2) {
|
||||
intensity = 2;
|
||||
}
|
||||
|
|
|
@ -1,40 +1,41 @@
|
|||
#define ALGO_CN_0 0
|
||||
#define ALGO_CN_1 1
|
||||
#define ALGO_CN_2 2
|
||||
#define ALGO_CN_R 3
|
||||
#define ALGO_CN_FAST 4
|
||||
#define ALGO_CN_HALF 5
|
||||
#define ALGO_CN_XAO 6
|
||||
#define ALGO_CN_RTO 7
|
||||
#define ALGO_CN_RWZ 8
|
||||
#define ALGO_CN_ZLS 9
|
||||
#define ALGO_CN_DOUBLE 10
|
||||
#define ALGO_CN_LITE_0 11
|
||||
#define ALGO_CN_LITE_1 12
|
||||
#define ALGO_CN_HEAVY_0 13
|
||||
#define ALGO_CN_HEAVY_TUBE 14
|
||||
#define ALGO_CN_HEAVY_XHV 15
|
||||
#define ALGO_CN_PICO_0 16
|
||||
#define ALGO_CN_PICO_TLO 17
|
||||
#define ALGO_CN_CCX 18
|
||||
#define ALGO_CN_UPX2 19
|
||||
#define ALGO_RX_0 20
|
||||
#define ALGO_RX_WOW 21
|
||||
#define ALGO_RX_ARQMA 22
|
||||
#define ALGO_RX_SFX 23
|
||||
#define ALGO_RX_KEVA 24
|
||||
#define ALGO_AR2_CHUKWA 25
|
||||
#define ALGO_AR2_CHUKWA_V2 26
|
||||
#define ALGO_AR2_WRKZ 27
|
||||
#define ALGO_ASTROBWT_DERO 28
|
||||
#define ALGO_KAWPOW_RVN 29
|
||||
#define ALGO_CN_0 0x63150000
|
||||
#define ALGO_CN_1 0x63150100
|
||||
#define ALGO_CN_2 0x63150200
|
||||
#define ALGO_CN_R 0x63150272
|
||||
#define ALGO_CN_FAST 0x63150166
|
||||
#define ALGO_CN_HALF 0x63150268
|
||||
#define ALGO_CN_XAO 0x63150078
|
||||
#define ALGO_CN_RTO 0x63150172
|
||||
#define ALGO_CN_RWZ 0x63150277
|
||||
#define ALGO_CN_ZLS 0x6315027a
|
||||
#define ALGO_CN_DOUBLE 0x63150264
|
||||
#define ALGO_CN_CCX 0x63150063
|
||||
#define ALGO_CN_LITE_0 0x63140000
|
||||
#define ALGO_CN_LITE_1 0x63140100
|
||||
#define ALGO_CN_HEAVY_0 0x63160000
|
||||
#define ALGO_CN_HEAVY_TUBE 0x63160172
|
||||
#define ALGO_CN_HEAVY_XHV 0x63160068
|
||||
#define ALGO_CN_PICO_0 0x63120200
|
||||
#define ALGO_CN_PICO_TLO 0x63120274
|
||||
#define ALGO_CN_UPX2 0x63110200
|
||||
#define ALGO_RX_0 0x72151200
|
||||
#define ALGO_RX_WOW 0x72141177
|
||||
#define ALGO_RX_ARQMA 0x72121061
|
||||
#define ALGO_RX_SFX 0x72151273
|
||||
#define ALGO_RX_KEVA 0x7214116b
|
||||
#define ALGO_AR2_CHUKWA 0x61130000
|
||||
#define ALGO_AR2_CHUKWA_V2 0x61140000
|
||||
#define ALGO_AR2_WRKZ 0x61120000
|
||||
#define ALGO_ASTROBWT_DERO 0x41000000
|
||||
#define ALGO_KAWPOW_RVN 0x6b0f0000
|
||||
|
||||
#define FAMILY_UNKNOWN 0
|
||||
#define FAMILY_CN 1
|
||||
#define FAMILY_CN_LITE 2
|
||||
#define FAMILY_CN_HEAVY 3
|
||||
#define FAMILY_CN_PICO 4
|
||||
#define FAMILY_RANDOM_X 5
|
||||
#define FAMILY_ARGON2 6
|
||||
#define FAMILY_ASTROBWT 7
|
||||
#define FAMILY_KAWPOW 8
|
||||
#define FAMILY_CN 0x63150000
|
||||
#define FAMILY_CN_LITE 0x63140000
|
||||
#define FAMILY_CN_HEAVY 0x63160000
|
||||
#define FAMILY_CN_PICO 0x63120200
|
||||
#define FAMILY_CN_FEMTO 0x63110200
|
||||
#define FAMILY_RANDOM_X 0x72000000
|
||||
#define FAMILY_ARGON2 0x61000000
|
||||
#define FAMILY_ASTROBWT 0x41000000
|
||||
#define FAMILY_KAWPOW 0x6b000000
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,13 +1,8 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright (c) 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,7 +18,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "backend/opencl/OclThreads.h"
|
||||
#include "backend/opencl/wrappers/OclDevice.h"
|
||||
#include "base/crypto/Algorithm.h"
|
||||
|
@ -36,31 +30,31 @@
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
constexpr const size_t oneMiB = 1024u * 1024u;
|
||||
constexpr const size_t oneMiB = 1024U * 1024U;
|
||||
|
||||
|
||||
static inline uint32_t getMaxThreads(const OclDevice &device, const Algorithm &algorithm)
|
||||
{
|
||||
if (device.vendorId() == OCL_VENDOR_NVIDIA && (device.name().contains("P100") || device.name().contains("V100"))) {
|
||||
return 40000u;
|
||||
return 40000U;
|
||||
}
|
||||
|
||||
const uint32_t ratio = (algorithm.l3() <= oneMiB) ? 2u : 1u;
|
||||
const uint32_t ratio = (algorithm.l3() <= oneMiB) ? 2U : 1U;
|
||||
|
||||
if (device.vendorId() == OCL_VENDOR_INTEL) {
|
||||
return ratio * device.computeUnits() * 8;
|
||||
}
|
||||
|
||||
return ratio * 1000u;
|
||||
return ratio * 1000U;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t getPossibleIntensity(const OclDevice &device, const Algorithm &algorithm)
|
||||
{
|
||||
const uint32_t maxThreads = getMaxThreads(device, algorithm);
|
||||
const size_t minFreeMem = (maxThreads == 40000u ? 512u : 128u) * oneMiB;
|
||||
const size_t minFreeMem = (maxThreads == 40000U ? 512U : 128U) * oneMiB;
|
||||
const size_t availableMem = device.freeMemSize() - minFreeMem;
|
||||
const size_t perThread = algorithm.l3() + 224u;
|
||||
const size_t perThread = algorithm.l3() + 224U;
|
||||
const auto maxIntensity = static_cast<uint32_t>(availableMem / perThread);
|
||||
|
||||
return std::min<uint32_t>(maxThreads, maxIntensity);
|
||||
|
@ -98,7 +92,7 @@ static uint32_t getStridedIndex(const OclDevice &device, const Algorithm &algori
|
|||
return 0;
|
||||
}
|
||||
|
||||
return CnAlgo<>::base(algorithm) == Algorithm::CN_2 ? 2 : 1;
|
||||
return algorithm.base() == Algorithm::CN_2 ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "backend/opencl/OclThreads.h"
|
||||
#include "backend/opencl/wrappers/OclDevice.h"
|
||||
#include "base/crypto/Algorithm.h"
|
||||
|
@ -36,7 +28,7 @@
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
constexpr const size_t oneMiB = 1024u * 1024u;
|
||||
constexpr const size_t oneMiB = 1024U * 1024U;
|
||||
|
||||
|
||||
static inline bool isMatch(const OclDevice &device, const Algorithm &algorithm)
|
||||
|
@ -49,23 +41,23 @@ static inline bool isMatch(const OclDevice &device, const Algorithm &algorithm)
|
|||
|
||||
static inline uint32_t getMaxThreads(const OclDevice &device, const Algorithm &algorithm)
|
||||
{
|
||||
const uint32_t ratio = (algorithm.l3() <= oneMiB) ? 2u : 1u;
|
||||
const uint32_t ratio = (algorithm.l3() <= oneMiB) ? 2U : 1U;
|
||||
|
||||
if (device.type() == OclDevice::Vega_10) {
|
||||
if (device.computeUnits() == 56 && algorithm.family() == Algorithm::CN && CnAlgo<>::base(algorithm) == Algorithm::CN_2) {
|
||||
return 1792u;
|
||||
if (device.computeUnits() == 56 && algorithm.family() == Algorithm::CN && algorithm.base() == Algorithm::CN_2) {
|
||||
return 1792U;
|
||||
}
|
||||
}
|
||||
|
||||
return ratio * 2024u;
|
||||
return ratio * 2024U;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t getPossibleIntensity(const OclDevice &device, const Algorithm &algorithm)
|
||||
{
|
||||
const uint32_t maxThreads = getMaxThreads(device, algorithm);
|
||||
const size_t availableMem = device.freeMemSize() - (128u * oneMiB);
|
||||
const size_t perThread = algorithm.l3() + 224u;
|
||||
const size_t availableMem = device.freeMemSize() - (128U * oneMiB);
|
||||
const size_t perThread = algorithm.l3() + 224U;
|
||||
const auto maxIntensity = static_cast<uint32_t>(availableMem / perThread);
|
||||
|
||||
return std::min<uint32_t>(maxThreads, maxIntensity);
|
||||
|
@ -88,28 +80,24 @@ static inline uint32_t getIntensity(const OclDevice &device, const Algorithm &al
|
|||
|
||||
static inline uint32_t getWorksize(const Algorithm &algorithm)
|
||||
{
|
||||
Algorithm::Family f = algorithm.family();
|
||||
const auto f = algorithm.family();
|
||||
if (f == Algorithm::CN_PICO || f == Algorithm::CN_FEMTO) {
|
||||
return 64;
|
||||
}
|
||||
|
||||
if (CnAlgo<>::base(algorithm) == Algorithm::CN_2) {
|
||||
return 16;
|
||||
}
|
||||
|
||||
return 8;
|
||||
return algorithm.base() == Algorithm::CN_2 ? 16 : 8;
|
||||
}
|
||||
|
||||
|
||||
static uint32_t getStridedIndex(const Algorithm &algorithm)
|
||||
{
|
||||
return CnAlgo<>::base(algorithm) == Algorithm::CN_2 ? 2 : 1;
|
||||
return algorithm.base() == Algorithm::CN_2 ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t getMemChunk(const Algorithm &algorithm)
|
||||
{
|
||||
return CnAlgo<>::base(algorithm) == Algorithm::CN_2 ? 1 : 2;
|
||||
return algorithm.base() == Algorithm::CN_2 ? 1 : 2;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "backend/opencl/runners/OclCnRunner.h"
|
||||
#include "backend/opencl/kernels/Cn0Kernel.h"
|
||||
#include "backend/opencl/kernels/Cn1Kernel.h"
|
||||
|
@ -39,12 +32,12 @@
|
|||
xmrig::OclCnRunner::OclCnRunner(size_t index, const OclLaunchData &data) : OclBaseRunner(index, data)
|
||||
{
|
||||
uint32_t stridedIndex = data.thread.stridedIndex();
|
||||
Algorithm::Family f = m_algorithm.family();
|
||||
const auto f = m_algorithm.family();
|
||||
|
||||
if (data.device.vendorId() == OCL_VENDOR_NVIDIA) {
|
||||
stridedIndex = 0;
|
||||
}
|
||||
else if (stridedIndex == 1 && (f == Algorithm::CN_PICO || f == Algorithm::CN_FEMTO || (f == Algorithm::CN && CnAlgo<>::base(m_algorithm) == Algorithm::CN_2))) {
|
||||
else if (stridedIndex == 1 && (f == Algorithm::CN_PICO || f == Algorithm::CN_FEMTO || (f == Algorithm::CN && m_algorithm.base() == Algorithm::CN_2))) {
|
||||
stridedIndex = 2;
|
||||
}
|
||||
|
||||
|
@ -52,10 +45,10 @@ xmrig::OclCnRunner::OclCnRunner(size_t index, const OclLaunchData &data) : OclBa
|
|||
m_options += " -DMASK=" + std::to_string(CnAlgo<>::mask(m_algorithm)) + "U";
|
||||
m_options += " -DWORKSIZE=" + std::to_string(data.thread.worksize()) + "U";
|
||||
m_options += " -DSTRIDED_INDEX=" + std::to_string(stridedIndex) + "U";
|
||||
m_options += " -DMEM_CHUNK_EXPONENT=" + std::to_string(1u << data.thread.memChunk()) + "U";
|
||||
m_options += " -DMEM_CHUNK_EXPONENT=" + std::to_string(1U << data.thread.memChunk()) + "U";
|
||||
m_options += " -DMEMORY=" + std::to_string(m_algorithm.l3()) + "LU";
|
||||
m_options += " -DALGO=" + std::to_string(m_algorithm.id());
|
||||
m_options += " -DALGO_BASE=" + std::to_string(CnAlgo<>::base(m_algorithm));
|
||||
m_options += " -DALGO_BASE=" + std::to_string(m_algorithm.base());
|
||||
m_options += " -DALGO_FAMILY=" + std::to_string(m_algorithm.family());
|
||||
m_options += " -DCN_UNROLL=" + std::to_string(data.thread.unrollFactor());
|
||||
}
|
||||
|
@ -96,7 +89,7 @@ void xmrig::OclCnRunner::run(uint32_t nonce, uint32_t *hashOutput)
|
|||
static const cl_uint zero = 0;
|
||||
|
||||
const size_t w_size = data().thread.worksize();
|
||||
const size_t g_thd = ((m_intensity + w_size - 1u) / w_size) * w_size;
|
||||
const size_t g_thd = ((m_intensity + w_size - 1U) / w_size) * w_size;
|
||||
|
||||
assert(g_thd % w_size == 0);
|
||||
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue