Browse Source

api: report throughput when default

master
Tanguy Pruvot 10 years ago
parent
commit
2a5233f56e
  1. 1
      Algo256/blake256.cu
  2. 1
      Algo256/keccak256.cu
  3. 1
      JHA/jackpotcoin.cu
  4. 35
      api.cpp
  5. 1
      api/index.php
  6. 1
      cuda_nist5.cu
  7. 13
      fuguecoin.cpp
  8. 15
      groestlcoin.cpp
  9. 1
      heavy/heavy.cu
  10. 1
      lyra2/lyra2RE.cu
  11. 5
      miner.h
  12. 15
      myriadgroestl.cpp
  13. 1
      pentablake.cu
  14. 1
      quark/animecoin.cu
  15. 1
      quark/quarkcoin.cu
  16. 1
      qubit/deep.cu
  17. 1
      qubit/doom.cu
  18. 1
      qubit/qubit.cu
  19. 1
      x11/fresh.cu
  20. 1
      x11/s3.cu
  21. 1
      x11/x11.cu
  22. 1
      x13/x13.cu
  23. 1
      x15/whirlpool.cu
  24. 1
      x15/x14.cu
  25. 1
      x15/x15.cu
  26. 1
      x17/x17.cu

1
Algo256/blake256.cu

@ -392,6 +392,7 @@ extern "C" int scanhash_blake256(int thr_id, uint32_t *pdata, const uint32_t *pt
#endif #endif
int intensity = (device_sm[device_map[thr_id]] > 500) ? 22 : 20; int intensity = (device_sm[device_map[thr_id]] > 500) ? 22 : 20;
uint32_t throughput = opt_work_size ? opt_work_size : (1 << intensity); uint32_t throughput = opt_work_size ? opt_work_size : (1 << intensity);
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, max_nonce - first_nonce);
int rc = 0; int rc = 0;

1
Algo256/keccak256.cu

@ -42,6 +42,7 @@ extern "C" int scanhash_keccak256(int thr_id, uint32_t *pdata,
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
uint32_t throughput = opt_work_size ? opt_work_size : (1 << 21); // 256*256*8*4 uint32_t throughput = opt_work_size ? opt_work_size : (1 << 21); // 256*256*8*4
apiReportThroughput(thr_id, throughput);
throughput = min(throughput, (max_nonce - first_nonce)); throughput = min(throughput, (max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
JHA/jackpotcoin.cu

@ -97,6 +97,7 @@ extern "C" int scanhash_jackpot(int thr_id, uint32_t *pdata,
((uint32_t*)ptarget)[7] = 0x000f; ((uint32_t*)ptarget)[7] = 0x000f;
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096 int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (!init[thr_id]) if (!init[thr_id])

35
api.cpp

@ -126,17 +126,6 @@ static void gpustatus(int thr_id)
#endif #endif
cuda_gpu_clocks(cgpu); cuda_gpu_clocks(cgpu);
// todo: can be 0 if set by algo (auto)
if (opt_intensity == 0 && opt_work_size) {
int i = 0;
uint32_t ws = opt_work_size;
while (ws > 1 && i++ < 32)
ws = ws >> 1;
cgpu->intensity = i;
} else {
cgpu->intensity = opt_intensity;
}
// todo: per gpu // todo: per gpu
cgpu->accepted = accepted_count; cgpu->accepted = accepted_count;
cgpu->rejected = rejected_count; cgpu->rejected = rejected_count;
@ -146,10 +135,10 @@ static void gpustatus(int thr_id)
card = device_name[gpuid]; card = device_name[gpuid];
snprintf(buf, sizeof(buf), "GPU=%d;BUS=%hd;CARD=%s;" snprintf(buf, sizeof(buf), "GPU=%d;BUS=%hd;CARD=%s;"
"TEMP=%.1f;FAN=%hu;RPM=%hu;FREQ=%d;KHS=%.2f;HWF=%d;I=%d|THR=%u", "TEMP=%.1f;FAN=%hu;RPM=%hu;FREQ=%d;KHS=%.2f;HWF=%d;I=%.2f;THR=%u|",
gpuid, cgpu->gpu_bus, card, cgpu->gpu_temp, cgpu->gpu_fan, gpuid, cgpu->gpu_bus, card, cgpu->gpu_temp, cgpu->gpu_fan,
cgpu->gpu_fan_rpm, cgpu->gpu_clock, cgpu->khashes, cgpu->gpu_fan_rpm, cgpu->gpu_clock, cgpu->khashes,
cgpu->hw_errors, cgpu->intensity, opt_work_size); cgpu->hw_errors, cgpu->intensity, cgpu->throughput);
// append to buffer for multi gpus // append to buffer for multi gpus
strcat(buffer, buf); strcat(buffer, buf);
@ -885,3 +874,23 @@ void *api_thread(void *userdata)
return NULL; return NULL;
} }
/* to be able to report the default value set in each algo */
void apiReportThroughput(int thr_id, uint32_t throughput)
{
struct cgpu_info *cgpu = &thr_info[thr_id].gpu;
if (cgpu) {
cgpu->throughput = throughput;
if (opt_intensity == 0) {
uint8_t i = 0;
uint32_t ws = throughput;
while (ws > 1 && i++ < 32)
ws = ws >> 1;
cgpu->intensity_int = i;
} else {
cgpu->intensity_int = (uint8_t) opt_intensity;
}
// dec. part to finish...
cgpu->intensity = (float) cgpu->intensity_int;
}
}

1
api/index.php

@ -49,6 +49,7 @@ function translateField($key)
$intl['DIFF'] = 'Difficulty'; $intl['DIFF'] = 'Difficulty';
$intl['UPTIME'] = 'Miner up time'; $intl['UPTIME'] = 'Miner up time';
$intl['TS'] = 'Last update'; $intl['TS'] = 'Last update';
$intl['THR'] = 'Throughput';
$intl['H'] = 'Bloc height'; $intl['H'] = 'Bloc height';
$intl['I'] = 'Intensity'; $intl['I'] = 'Intensity';

1
cuda_nist5.cu

@ -76,6 +76,7 @@ extern "C" int scanhash_nist5(int thr_id, uint32_t *pdata,
((uint32_t*)ptarget)[7] = 0x00FF; ((uint32_t*)ptarget)[7] = 0x00FF;
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096 int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int) (max_nonce - first_nonce)); throughput = min(throughput, (int) (max_nonce - first_nonce));
if (!init[thr_id]) if (!init[thr_id])

13
fuguecoin.cpp

@ -27,8 +27,9 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, const uint32_t *pt
{ {
uint32_t start_nonce = pdata[19]++; uint32_t start_nonce = pdata[19]++;
int intensity = (device_sm[device_map[thr_id]] > 500) ? 22 : 19; int intensity = (device_sm[device_map[thr_id]] > 500) ? 22 : 19;
uint32_t throughPut = opt_work_size ? opt_work_size : (1 << intensity); uint32_t throughput = opt_work_size ? opt_work_size : (1 << intensity);
throughPut = min(throughPut, max_nonce - start_nonce); apiReportThroughput(thr_id, throughput);
throughput = min(throughput, max_nonce - start_nonce);
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0xf; ((uint32_t*)ptarget)[7] = 0xf;
@ -36,7 +37,7 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, const uint32_t *pt
// init // init
if(!init[thr_id]) if(!init[thr_id])
{ {
fugue256_cpu_init(thr_id, throughPut); fugue256_cpu_init(thr_id, throughput);
init[thr_id] = true; init[thr_id] = true;
} }
@ -51,7 +52,7 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, const uint32_t *pt
do { do {
// GPU // GPU
uint32_t foundNounce = 0xFFFFFFFF; uint32_t foundNounce = 0xFFFFFFFF;
fugue256_cpu_hash(thr_id, throughPut, pdata[19], NULL, &foundNounce); fugue256_cpu_hash(thr_id, throughput, pdata[19], NULL, &foundNounce);
if(foundNounce < 0xffffffff) if(foundNounce < 0xffffffff)
{ {
@ -74,12 +75,12 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, const uint32_t *pt
} }
} }
if ((uint64_t) pdata[19] + throughPut > (uint64_t) max_nonce) { if ((uint64_t) pdata[19] + throughput > (uint64_t) max_nonce) {
pdata[19] = max_nonce; pdata[19] = max_nonce;
break; break;
} }
pdata[19] += throughPut; pdata[19] += throughput;
} while (!work_restart[thr_id].restart); } while (!work_restart[thr_id].restart);

15
groestlcoin.cpp

@ -64,10 +64,11 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, const uint32_t
uint32_t max_nonce, unsigned long *hashes_done) uint32_t max_nonce, unsigned long *hashes_done)
{ {
uint32_t start_nonce = pdata[19]++; uint32_t start_nonce = pdata[19]++;
uint32_t throughPut = opt_work_size ? opt_work_size : (1 << 19); // 256*2048 uint32_t throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*2048
throughPut = min(throughPut, max_nonce - start_nonce); apiReportThroughput(thr_id, throughput);
throughput = min(throughput, max_nonce - start_nonce);
uint32_t *outputHash = (uint32_t*)malloc(throughPut * 16 * sizeof(uint32_t)); uint32_t *outputHash = (uint32_t*)malloc(throughput * 16 * sizeof(uint32_t));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000000ff; ((uint32_t*)ptarget)[7] = 0x000000ff;
@ -75,7 +76,7 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, const uint32_t
// init // init
if(!init[thr_id]) if(!init[thr_id])
{ {
groestlcoin_cpu_init(thr_id, throughPut); groestlcoin_cpu_init(thr_id, throughput);
init[thr_id] = true; init[thr_id] = true;
} }
@ -92,7 +93,7 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, const uint32_t
uint32_t foundNounce = 0xFFFFFFFF; uint32_t foundNounce = 0xFFFFFFFF;
const uint32_t Htarg = ptarget[7]; const uint32_t Htarg = ptarget[7];
groestlcoin_cpu_hash(thr_id, throughPut, pdata[19], outputHash, &foundNounce); groestlcoin_cpu_hash(thr_id, throughput, pdata[19], outputHash, &foundNounce);
if(foundNounce < 0xffffffff) if(foundNounce < 0xffffffff)
{ {
@ -112,9 +113,9 @@ extern "C" int scanhash_groestlcoin(int thr_id, uint32_t *pdata, const uint32_t
foundNounce = 0xffffffff; foundNounce = 0xffffffff;
} }
if (pdata[19] + throughPut < pdata[19]) if (pdata[19] + throughput < pdata[19])
pdata[19] = max_nonce; pdata[19] = max_nonce;
else pdata[19] += throughPut; else pdata[19] += throughput;
} while (pdata[19] < max_nonce && !work_restart[thr_id].restart); } while (pdata[19] < max_nonce && !work_restart[thr_id].restart);

1
heavy/heavy.cu

@ -137,6 +137,7 @@ int scanhash_heavy(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
// CUDA will process thousands of threads. // CUDA will process thousands of threads.
int throughput = opt_work_size ? opt_work_size : (1 << 19) - 256; // 256*2048 int throughput = opt_work_size ? opt_work_size : (1 << 19) - 256; // 256*2048
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
int rc = 0; int rc = 0;

1
lyra2/lyra2RE.cu

@ -64,6 +64,7 @@ extern "C" int scanhash_lyra2(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 18 : 17; int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 18 : 17;
int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 18=256*256*4; int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 18=256*256*4;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

5
miner.h

@ -378,6 +378,7 @@ extern int scanhash_x17(int thr_id, uint32_t *pdata,
/* api related */ /* api related */
void *api_thread(void *userdata); void *api_thread(void *userdata);
void apiReportThroughput(int thr_id, uint32_t throughput);
struct cgpu_info { struct cgpu_info {
uint8_t gpu_id; uint8_t gpu_id;
@ -386,7 +387,7 @@ struct cgpu_info {
int rejected; int rejected;
int hw_errors; int hw_errors;
double khashes; double khashes;
uint8_t intensity; uint8_t intensity_int;
uint8_t has_monitoring; uint8_t has_monitoring;
float gpu_temp; float gpu_temp;
uint16_t gpu_fan; uint16_t gpu_fan;
@ -407,6 +408,8 @@ struct cgpu_info {
char gpu_sn[64]; char gpu_sn[64];
char gpu_desc[64]; char gpu_desc[64];
float intensity;
uint32_t throughput;
}; };
struct thr_api { struct thr_api {

15
myriadgroestl.cpp

@ -42,10 +42,11 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, const uint32_t *ptar
uint32_t start_nonce = pdata[19]++; uint32_t start_nonce = pdata[19]++;
uint32_t throughPut = opt_work_size ? opt_work_size : (1 << 17); uint32_t throughput = opt_work_size ? opt_work_size : (1 << 17);
throughPut = min(throughPut, max_nonce - start_nonce); apiReportThroughput(thr_id, throughput);
throughput = min(throughput, max_nonce - start_nonce);
uint32_t *outputHash = (uint32_t*)malloc(throughPut * 16 * sizeof(uint32_t)); uint32_t *outputHash = (uint32_t*)malloc(throughput * 16 * sizeof(uint32_t));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x0000ff; ((uint32_t*)ptarget)[7] = 0x0000ff;
@ -55,7 +56,7 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, const uint32_t *ptar
{ {
#if BIG_DEBUG #if BIG_DEBUG
#else #else
myriadgroestl_cpu_init(thr_id, throughPut); myriadgroestl_cpu_init(thr_id, throughput);
#endif #endif
init[thr_id] = true; init[thr_id] = true;
} }
@ -72,7 +73,7 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, const uint32_t *ptar
uint32_t foundNounce = 0xFFFFFFFF; uint32_t foundNounce = 0xFFFFFFFF;
const uint32_t Htarg = ptarget[7]; const uint32_t Htarg = ptarget[7];
myriadgroestl_cpu_hash(thr_id, throughPut, pdata[19], outputHash, &foundNounce); myriadgroestl_cpu_hash(thr_id, throughput, pdata[19], outputHash, &foundNounce);
if(foundNounce < 0xffffffff) if(foundNounce < 0xffffffff)
{ {
@ -92,11 +93,11 @@ extern "C" int scanhash_myriad(int thr_id, uint32_t *pdata, const uint32_t *ptar
foundNounce = 0xffffffff; foundNounce = 0xffffffff;
} }
if ((uint64_t) pdata[19] + throughPut > (uint64_t) max_nonce) { if ((uint64_t) pdata[19] + throughput > (uint64_t) max_nonce) {
pdata[19] = max_nonce; pdata[19] = max_nonce;
break; break;
} }
pdata[19] += throughPut; pdata[19] += throughput;
} while (!work_restart[thr_id].restart); } while (!work_restart[thr_id].restart);

1
pentablake.cu

@ -371,6 +371,7 @@ extern "C" int scanhash_pentablake(int thr_id, uint32_t *pdata, const uint32_t *
uint32_t endiandata[20]; uint32_t endiandata[20];
int rc = 0; int rc = 0;
int throughput = opt_work_size ? opt_work_size : (128 * 2560); // 18.5 int throughput = opt_work_size ? opt_work_size : (128 * 2560); // 18.5
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
quark/animecoin.cu

@ -168,6 +168,7 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*2048 int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*2048
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
quark/quarkcoin.cu

@ -139,6 +139,7 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096 int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
qubit/deep.cu

@ -61,6 +61,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8 int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
qubit/doom.cu

@ -41,6 +41,7 @@ extern "C" int scanhash_doom(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20]; uint32_t endiandata[20];
uint32_t throughput = opt_work_size ? opt_work_size : (1 << 22); // 256*256*8*8 uint32_t throughput = opt_work_size ? opt_work_size : (1 << 22); // 256*256*8*8
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (max_nonce - first_nonce)); throughput = min(throughput, (max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
qubit/qubit.cu

@ -81,6 +81,7 @@ extern "C" int scanhash_qubit(int thr_id, uint32_t *pdata,
uint32_t endiandata[20]; uint32_t endiandata[20];
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8 int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x11/fresh.cu

@ -78,6 +78,7 @@ extern "C" int scanhash_fresh(int thr_id, uint32_t *pdata,
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int) (max_nonce - first_nonce)); throughput = min(throughput, (int) (max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x11/s3.cu

@ -63,6 +63,7 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
intensity--; intensity--;
#endif #endif
int throughput = opt_work_size ? opt_work_size : (1 << intensity); int throughput = opt_work_size ? opt_work_size : (1 << intensity);
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x11/x11.cu

@ -134,6 +134,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19; int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 20=256*256*16; int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 20=256*256*16;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x13/x13.cu

@ -153,6 +153,7 @@ extern "C" int scanhash_x13(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int intensity = 19; // (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19; int intensity = 19; // (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19;
int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 19=256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << intensity); // 19=256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x15/whirlpool.cu

@ -58,6 +58,7 @@ extern "C" int scanhash_whc(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x15/x14.cu

@ -164,6 +164,7 @@ extern "C" int scanhash_x14(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x15/x15.cu

@ -175,6 +175,7 @@ extern "C" int scanhash_x15(int thr_id, uint32_t *pdata,
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

1
x17/x17.cu

@ -192,6 +192,7 @@ extern "C" int scanhash_x17(int thr_id, uint32_t *pdata,
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
apiReportThroughput(thr_id, (uint32_t) throughput);
throughput = min(throughput, (int)(max_nonce - first_nonce)); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)

Loading…
Cancel
Save