mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-24 21:45:04 +00:00
ccminer: argument fix for 10th device selection
This commit is contained in:
parent
4d09d856f6
commit
575aa1a0e4
@ -3593,10 +3593,10 @@ void parse_arg(int key, char *arg)
|
||||
{
|
||||
int device_thr[MAX_GPUS] = { 0 };
|
||||
int ngpus = cuda_num_devices();
|
||||
char * pch = strtok (arg,",");
|
||||
char* pch = strtok(arg,",");
|
||||
opt_n_threads = 0;
|
||||
while (pch != NULL && opt_n_threads < MAX_GPUS) {
|
||||
if (pch[0] >= '0' && pch[0] <= '9' && pch[1] == '\0')
|
||||
if (pch[0] >= '0' && pch[0] <= '9' && strlen(pch) <= 2)
|
||||
{
|
||||
if (atoi(pch) < ngpus)
|
||||
device_map[opt_n_threads++] = atoi(pch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user