mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-02 03:06:30 +00:00
#2280 Disable GPU backends in benchmark mode.
This commit is contained in:
parent
a403c53543
commit
695fbc013b
2 changed files with 12 additions and 2 deletions
|
@ -57,6 +57,12 @@ public:
|
||||||
|
|
||||||
Pools();
|
Pools();
|
||||||
|
|
||||||
|
# ifdef XMRIG_FEATURE_BENCHMARK
|
||||||
|
inline bool isBenchmark() const { return !!m_benchmark; }
|
||||||
|
# else
|
||||||
|
inline constexpr bool isBenchmark() const { return false; }
|
||||||
|
# endif
|
||||||
|
|
||||||
inline const std::vector<Pool> &data() const { return m_data; }
|
inline const std::vector<Pool> &data() const { return m_data; }
|
||||||
inline int retries() const { return m_retries; }
|
inline int retries() const { return m_retries; }
|
||||||
inline int retryPause() const { return m_retryPause; }
|
inline int retryPause() const { return m_retryPause; }
|
||||||
|
|
|
@ -225,11 +225,15 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_OPENCL
|
# ifdef XMRIG_FEATURE_OPENCL
|
||||||
d_ptr->cl.read(reader.getValue(kOcl));
|
if (!pools().isBenchmark()) {
|
||||||
|
d_ptr->cl.read(reader.getValue(kOcl));
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_CUDA
|
# ifdef XMRIG_FEATURE_CUDA
|
||||||
d_ptr->cuda.read(reader.getValue(kCuda));
|
if (!pools().isBenchmark()) {
|
||||||
|
d_ptr->cuda.read(reader.getValue(kCuda));
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
|
|
Loading…
Reference in a new issue