mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-20 06:08:37 +02:00
The "low_power_mode" option in config.txt can be set to numeral values between 1 and 5. A value of 5 seems optimal on certain processors with large L4 cache.
44 lines
628 B
C++
44 lines
628 B
C++
#pragma once
|
|
|
|
#include "xmrstak/params.hpp"
|
|
|
|
#include <stdlib.h>
|
|
#include <string>
|
|
|
|
namespace xmrstak
|
|
{
|
|
namespace cpu
|
|
{
|
|
|
|
class jconf
|
|
{
|
|
public:
|
|
static jconf* inst()
|
|
{
|
|
if (oInst == nullptr) oInst = new jconf;
|
|
return oInst;
|
|
};
|
|
|
|
bool parse_config(const char* sFilename = params::inst().configFileCPU.c_str());
|
|
|
|
struct thd_cfg {
|
|
int iMultiway;
|
|
bool bNoPrefetch;
|
|
long long iCpuAff;
|
|
};
|
|
|
|
size_t GetThreadCount();
|
|
bool GetThreadConfig(size_t id, thd_cfg &cfg);
|
|
bool NeedsAutoconf();
|
|
|
|
private:
|
|
jconf();
|
|
static jconf* oInst;
|
|
|
|
struct opaque_private;
|
|
opaque_private* prv;
|
|
};
|
|
|
|
} // namespace cpu
|
|
} // namepsace xmrstak
|