diff options
Diffstat (limited to 'xmrstak/backend/amd/jconf.hpp')
-rw-r--r-- | xmrstak/backend/amd/jconf.hpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/xmrstak/backend/amd/jconf.hpp b/xmrstak/backend/amd/jconf.hpp new file mode 100644 index 0000000..9fef331 --- /dev/null +++ b/xmrstak/backend/amd/jconf.hpp @@ -0,0 +1,44 @@ +#pragma once +#include <stdlib.h> +#include <string> +#include "../../Params.hpp" + +namespace xmrstak +{ +namespace amd +{ + +class jconf +{ +public: + static jconf* inst() + { + if (oInst == nullptr) oInst = new jconf; + return oInst; + }; + + bool parse_config(const char* sFilename = Params::inst().configFileAMD.c_str()); + + struct thd_cfg { + size_t index; + size_t intensity; + size_t w_size; + long long cpu_aff; + }; + + size_t GetThreadCount(); + bool GetThreadConfig(size_t id, thd_cfg &cfg); + + size_t GetPlatformIdx(); + +private: + jconf(); + static jconf* oInst; + + struct opaque_private; + opaque_private* prv; + +}; + +} // namespace amd +} // namespace xmrstak |