mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Make sure we can have gpu and cpu threads running.
This commit is contained in:
parent
24a28e29e9
commit
dfc52fd543
12
cpu-miner.c
12
cpu-miner.c
@ -1297,6 +1297,10 @@ int main (int argc, char *argv[])
|
|||||||
applog(LOG_INFO, "%i", nDevs);
|
applog(LOG_INFO, "%i", nDevs);
|
||||||
return nDevs;
|
return nDevs;
|
||||||
}
|
}
|
||||||
|
/* Invert the value to determine if we manually set it in cmdline
|
||||||
|
* or disable gpu threads */
|
||||||
|
if (nDevs)
|
||||||
|
opt_n_threads = - opt_n_threads;
|
||||||
|
|
||||||
rpc_url = strdup(DEF_RPC_URL);
|
rpc_url = strdup(DEF_RPC_URL);
|
||||||
|
|
||||||
@ -1304,8 +1308,12 @@ int main (int argc, char *argv[])
|
|||||||
parse_cmdline(argc, argv);
|
parse_cmdline(argc, argv);
|
||||||
|
|
||||||
gpu_threads = nDevs * opt_g_threads;
|
gpu_threads = nDevs * opt_g_threads;
|
||||||
if (gpu_threads)
|
if (opt_n_threads < 0) {
|
||||||
opt_n_threads = 0;
|
if (gpu_threads)
|
||||||
|
opt_n_threads = 0;
|
||||||
|
else
|
||||||
|
opt_n_threads = -opt_n_threads;
|
||||||
|
}
|
||||||
|
|
||||||
if (!rpc_userpass) {
|
if (!rpc_userpass) {
|
||||||
if (!rpc_user || !rpc_pass) {
|
if (!rpc_user || !rpc_pass) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user