Skip to content
Snippets Groups Projects
Commit 87357352 authored by psychocrypt's avatar psychocrypt
Browse files

simplify templates

parent 2c5c6f38
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,6 @@ private:
configTpl.set( std::string(tpl) );
std::string conf;
conf += std::string("\"gpu_threads_conf\" :\n[\n");
int i = 0;
for(auto& ctx : devVec)
{
......@@ -97,7 +96,6 @@ private:
" },\n";
++i;
}
conf += std::string("],\n\n");
configTpl.replace("PLATFORMINDEX",std::to_string(platformIndex));
configTpl.replace("NUMGPUS",std::to_string(devVec.size()));
......
......@@ -11,10 +11,15 @@ R"===(
* intensity - Number of parallel GPU threads (nothing to do with CPU threads)
* worksize - Number of local GPU threads (nothing to do with CPU threads)
* affine_to_cpu - This will affine the thread to a CPU. This can make a GPU miner play along nicer with a CPU miner.
* "gpu_threads_conf" :
* [
* { "index" : 0, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
* ],
*/
"gpu_threads_conf" : [
GPUCONFIG
],
/*
* Platform index. This will be 0 unless you have different OpenCL platform - eg. AMD and Intel.
......
......@@ -44,7 +44,6 @@ public:
configTpl.set( std::string(tpl) );
std::string conf;
conf += std::string("\"cpu_threads_conf\" :\n[\n");
if(!detectL3Size() || L3KB_size < 1024 || L3KB_size > 102400)
{
......@@ -96,8 +95,6 @@ public:
}
}
conf += std::string("],\n\n");
configTpl.replace("CPUCONFIG",conf);
configTpl.write("cpu.txt");
printer::inst()->print_msg(L0, "CPU configuration stored in file '%s'", "cpu.txt");
......
......@@ -42,7 +42,6 @@ public:
;
configTpl.set( std::string(tpl) );
conf += std::string("\"cpu_threads_conf\" :\n[\n");
try
{
std::vector<hwloc_obj_t> tlcs;
......@@ -73,7 +72,6 @@ public:
conf += std::string(" { \"low_power_mode\" : false, \"no_prefetch\" : true, \"affine_to_cpu\" : false },\n");
printer::inst()->print_msg(L0, "Autoconf FAILED: %s. Create config for a single thread.", err.what());
}
conf += std::string("],\n\n");
configTpl.replace("CPUCONFIG",conf);
configTpl.write("cpu.txt");
......
......@@ -24,7 +24,10 @@ R"===(
* ],
*/
"cpu_threads_conf" :
[
CPUCONFIG
],
/*
* LARGE PAGE SUPPORT
......
......@@ -86,7 +86,6 @@ private:
configTpl.set( std::string(tpl) );
std::string conf;
conf += std::string("\"gpu_threads_conf\" :\n[\n");
int i = 0;
for(auto& ctx : nvidCtxVec)
{
......@@ -98,7 +97,6 @@ private:
" },\n";
++i;
}
conf += std::string("],\n\n");
configTpl.replace("GPUCONFIG",conf);
configTpl.write("nvidia.txt");
......
......@@ -20,6 +20,9 @@ R"===(
* ],
*/
"gpu_threads_conf" :
[
GPUCONFIG
],
)==="
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment