Browse Source

Revert "make throughput unsigned"

This reverts commit 82713a8ac14e0735ad4e828452c56e7cde4809e1.
1.5.1-tpruvot
Tanguy Pruvot 10 years ago
parent
commit
9adb7d7973
  1. 4
      JHA/jackpotcoin.cu
  2. 2
      cuda_nist5.cu
  3. 6
      heavy/heavy.cu
  4. 4
      lyra2/lyra2RE.cu
  5. 5
      pentablake.cu
  6. 5
      quark/quarkcoin.cu
  7. 2
      qubit/deep.cu
  8. 5
      qubit/qubit.cu
  9. 11
      x11/s3.cu
  10. 5
      x11/x11.cu
  11. 4
      x15/whirlpool.cu
  12. 4
      x15/x14.cu
  13. 4
      x15/x15.cu
  14. 4
      x17/x17.cu

4
JHA/jackpotcoin.cu

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

2
cuda_nist5.cu

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

6
heavy/heavy.cu

@ -127,7 +127,7 @@ struct check_nonce_for_remove @@ -127,7 +127,7 @@ struct check_nonce_for_remove
}
};
static bool init[8] = { 0 };
static bool init[8] = {0,0,0,0,0,0,0,0};
__host__
int scanhash_heavy(int thr_id, uint32_t *pdata,
@ -135,8 +135,8 @@ int scanhash_heavy(int thr_id, uint32_t *pdata, @@ -135,8 +135,8 @@ int scanhash_heavy(int thr_id, uint32_t *pdata,
unsigned long *hashes_done, uint32_t maxvote, int blocklen)
{
const uint32_t first_nonce = pdata[19];
// Remove 256 to allow -i 20
uint32_t throughput = opt_work_size ? opt_work_size : (1 << 19) - 256; // 256*2048
// CUDA will process thousands of threads.
int throughput = opt_work_size ? opt_work_size : (1 << 19) - 256; // 256*2048
throughput = min(throughput, (int)(max_nonce - first_nonce));
int rc = 0;

4
lyra2/lyra2RE.cu

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

5
pentablake.cu

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

5
quark/quarkcoin.cu

@ -137,8 +137,9 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata, @@ -137,8 +137,9 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
unsigned long *hashes_done)
{
const uint32_t first_nonce = pdata[19];
uint32_t throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096
throughput = min(throughput, max_nonce - first_nonce);
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*4096
throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00F;

2
qubit/deep.cu

@ -69,7 +69,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata, @@ -69,7 +69,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata,
if (!init[thr_id])
{
cudaSetDevice(device_map[thr_id]);
CUDA_SAFE_CALL(cudaMalloc(&d_hash[thr_id], 16 * sizeof(uint32_t) * throughput));
cudaMalloc(&d_hash[thr_id], 16 * sizeof(uint32_t) * throughput);
qubit_luffa512_cpu_init(thr_id, throughput);
x11_cubehash512_cpu_init(thr_id, throughput);

5
qubit/qubit.cu

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

11
x11/s3.cu

@ -57,10 +57,13 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata, @@ -57,10 +57,13 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
unsigned long *hashes_done)
{
const uint32_t first_nonce = pdata[19];
int intensity = (device_sm[device_map[thr_id]] >= 500 && !is_windows()) ? 20 : 19;
uint32_t throughput = opt_work_size ? opt_work_size : (1 << intensity);
throughput = min(throughput, max_nonce - first_nonce);
int intensity = 20; // 256*256*8*2;
#ifdef WIN32
// reduce by one the intensity on windows
intensity--;
#endif
int throughput = opt_work_size ? opt_work_size : (1 << intensity);
throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0xF;

5
x11/x11.cu

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

4
x15/whirlpool.cu

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

4
x15/x14.cu

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

4
x15/x15.cu

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

4
x17/x17.cu

@ -191,8 +191,8 @@ extern "C" int scanhash_x17(int thr_id, uint32_t *pdata, @@ -191,8 +191,8 @@ extern "C" int scanhash_x17(int thr_id, uint32_t *pdata,
unsigned long *hashes_done)
{
const uint32_t first_nonce = pdata[19];
uint32_t throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
throughput = min(throughput, max_nonce - first_nonce);
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8;
throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00ff;

Loading…
Cancel
Save