1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-10 14:57:53 +00:00

intensity: fix typo and drop old function

This commit is contained in:
Tanguy Pruvot 2015-10-11 08:39:07 +02:00
parent d195f2e8a2
commit 58c0bb5c02
2 changed files with 2 additions and 12 deletions

View File

@ -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);

View File

@ -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"