Browse Source

intensity: fix typo and drop old function

master
Tanguy Pruvot 9 years ago
parent
commit
58c0bb5c02
  1. 12
      cuda.cpp
  2. 2
      miner.h

12
cuda.cpp

@ -149,22 +149,12 @@ int cuda_finddevice(char *name)
return -1; 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 // since 1.7
uint32_t cuda_default_throughput(int thr_id, uint32_t defcount) uint32_t cuda_default_throughput(int thr_id, uint32_t defcount)
{ {
//int dev_id = device_map[thr_id % MAX_GPUS]; //int dev_id = device_map[thr_id % MAX_GPUS];
uint32_t throughput = gpus_intensity[thr_id] ? gpus_intensity[thr_id] : defcount; 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); api_set_throughput(thr_id, throughput);
bench_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); //if (opt_debug) applog(LOG_DEBUG, "GPU %d-%d: throughput %u", dev_id, thr_id, throughput);

2
miner.h

@ -490,8 +490,8 @@ int cuda_finddevice(char *name);
void cuda_print_devices(); void cuda_print_devices();
int cuda_available_memory(int thr_id); 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); 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_N "\x1B[0m"
#define CL_RED "\x1B[31m" #define CL_RED "\x1B[31m"

Loading…
Cancel
Save