diff --git a/cuda.cpp b/cuda.cpp index 08c0a57..54296b3 100644 --- a/cuda.cpp +++ b/cuda.cpp @@ -149,22 +149,12 @@ int cuda_finddevice(char *name) return -1; } -// deprecated since 1.7 -uint32_t device_intensity(int thr_id, const char *func, uint32_t defcount) -{ - uint32_t throughput = gpus_intensity[thr_id] ? gpus_intensity[thr_id] : defcount; - if (gpu_threads > 1) throughput >> (gpu_threads-1); - api_set_throughput(thr_id, throughput); - bench_set_throughput(thr_id, throughput); - return throughput; -} - // since 1.7 uint32_t cuda_default_throughput(int thr_id, uint32_t defcount) { //int dev_id = device_map[thr_id % MAX_GPUS]; uint32_t throughput = gpus_intensity[thr_id] ? gpus_intensity[thr_id] : defcount; - if (gpu_threads > 1) throughput >> (gpu_threads-1); + if (gpu_threads > 1 && throughput == defcount) throughput /= (gpu_threads-1); api_set_throughput(thr_id, throughput); bench_set_throughput(thr_id, throughput); //if (opt_debug) applog(LOG_DEBUG, "GPU %d-%d: throughput %u", dev_id, thr_id, throughput); diff --git a/miner.h b/miner.h index 8441e00..71d8cba 100644 --- a/miner.h +++ b/miner.h @@ -490,8 +490,8 @@ int cuda_finddevice(char *name); void cuda_print_devices(); int cuda_available_memory(int thr_id); -uint32_t device_intensity(int thr_id, const char *func, uint32_t defcount); uint32_t cuda_default_throughput(int thr_id, uint32_t defcount); +#define device_intensity(t,f,d) cuda_default_throughput(t,d) #define CL_N "\x1B[0m" #define CL_RED "\x1B[31m"