diff options
Diffstat (limited to 'xmrstak/backend/nvidia/jconf.hpp')
-rw-r--r-- | xmrstak/backend/nvidia/jconf.hpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/xmrstak/backend/nvidia/jconf.hpp b/xmrstak/backend/nvidia/jconf.hpp new file mode 100644 index 0000000..8959088 --- /dev/null +++ b/xmrstak/backend/nvidia/jconf.hpp @@ -0,0 +1,51 @@ +#pragma once +#include <stdlib.h> +#include <string> +#include "../../Params.hpp" + +namespace xmrstak +{ +namespace nvidia +{ + +class jconf +{ +public: + static jconf* inst() + { + if (oInst == nullptr) oInst = new jconf; + return oInst; + }; + + bool parse_config(const char* sFilename = Params::inst().configFileNVIDIA.c_str()); + + struct thd_cfg { + uint32_t id; + uint32_t blocks; + uint32_t threads; + uint32_t bfactor; + uint32_t bsleep; + bool bDoubleMode; + bool bNoPrefetch; + int32_t cpu_aff; + + long long iCpuAff; + }; + + size_t GetGPUThreadCount(); + + bool GetGPUThreadConfig(size_t id, thd_cfg &cfg); + + bool NeedsAutoconf(); + +private: + jconf(); + static jconf* oInst; + + struct opaque_private; + opaque_private* prv; + +}; + +} // namespace nvidia +} // namepsace xmrstak |