mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-02 03:06:30 +00:00
Implemented --opencl-no-cache, --opencl-loader, --opencl-platform command line options.
This commit is contained in:
parent
2604705bab
commit
6267ecc3dc
3 changed files with 30 additions and 0 deletions
|
@ -155,6 +155,19 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
case IConfig::OclKey: /* --opencl */
|
||||
m_opencl = true;
|
||||
break;
|
||||
|
||||
case IConfig::OclCacheKey: /* --opencl-no-cache */
|
||||
return set(doc, kOcl, "cache", false);
|
||||
|
||||
case IConfig::OclLoaderKey: /* --opencl-loader */
|
||||
return set(doc, kOcl, "loader", arg);
|
||||
|
||||
case IConfig::OclPlatformKey: /* --opencl-platform */
|
||||
if (strlen(arg) < 3) {
|
||||
return set(doc, kOcl, "platform", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||
}
|
||||
|
||||
return set(doc, kOcl, "platform", arg);
|
||||
# endif
|
||||
|
||||
default:
|
||||
|
|
|
@ -94,6 +94,14 @@ static const option options[] = {
|
|||
# endif
|
||||
# ifdef XMRIG_FEATURE_OPENCL
|
||||
{ "opencl", 0, nullptr, IConfig::OclKey },
|
||||
{ "opencl-devices", 1, nullptr, IConfig::OclDevicesKey },
|
||||
{ "opencl-launch", 1, nullptr, IConfig::OclLaunchKey },
|
||||
{ "opencl-strided-index", 1, nullptr, IConfig::OclSridedIndexKey },
|
||||
{ "opencl-mem-chunk", 1, nullptr, IConfig::OclMemChunkKey },
|
||||
{ "opencl-affinity", 1, nullptr, IConfig::OclAffinityKey },
|
||||
{ "opencl-platform", 1, nullptr, IConfig::OclPlatformKey },
|
||||
{ "opencl-loader", 1, nullptr, IConfig::OclLoaderKey },
|
||||
{ "opencl-no-cache", 0, nullptr, IConfig::OclCacheKey },
|
||||
# endif
|
||||
{ nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
|
|
@ -97,6 +97,15 @@ static inline const std::string &usage()
|
|||
# ifdef XMRIG_FEATURE_OPENCL
|
||||
u += "\nOpenCL backend:\n";
|
||||
u += " --opencl enable OpenCL mining backend\n";
|
||||
u += " --opencl-devices=N list of OpenCL devices to use\n";
|
||||
u += " --opencl-launch=IxW list of launch config, intensity and worksize\n";
|
||||
u += " --opencl-strided-index=N list of strided_index option values for each thread\n";
|
||||
u += " --opencl-mem-chunk=N list of mem_chunk option values for each thread\n";
|
||||
u += " --opencl-affinity=N list of affinity GPU threads to a CPU\n";
|
||||
u += " --opencl-platform=N OpenCL platform index or name\n";
|
||||
u += " --opencl-loader=N path to OpenCL-ICD-Loader (OpenCL.dll or libOpenCL.so)\n";
|
||||
u += " --opencl-no-cache disable OpenCL cache\n";
|
||||
u += " --print-platforms print available OpenCL platforms and exit\n";
|
||||
# endif
|
||||
|
||||
u += "\nLogging:\n";
|
||||
|
|
Loading…
Reference in a new issue