Skip to content

Commit

Permalink
make sure that throughput is a multiple of 1024
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed Aug 15, 2015
1 parent edd87f2 commit 086bd1a
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Algo256/blake256.cu
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ extern int scanhash_blake256(int thr_id, uint32_t *pdata, uint32_t *ptarget,
#endif
unsigned int intensity = (device_sm[device_map[thr_id]] > 500) ? 28 : 28;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << intensity);
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;

int rc = 0;

Expand Down
2 changes: 1 addition & 1 deletion Algo256/keccak256.cu
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern int scanhash_keccak256(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];
uint32_t intensity = (device_sm[device_map[thr_id]] > 500) ? 1 << 28 : 1 << 27;;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 256*4096
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;


if (opt_benchmark)
Expand Down
2 changes: 1 addition & 1 deletion JHA/jackpotcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extern int scanhash_jackpot(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];

uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << 20);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x000f;
Expand Down
2 changes: 1 addition & 1 deletion bitcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ int scanhash_bitcoin(int thr_id, uint32_t *pdata,
{
const uint32_t first_nonce = pdata[19];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << 28);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0005;
Expand Down
2 changes: 1 addition & 1 deletion bitcredit/bitcredit.cu
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int scanhash_bitcredit(int thr_id, uint32_t *pdata,
ptarget[7] = 0x00000001;

int intensity = 256 * 256 * 64 * 8;
const uint32_t throughput = min(device_intensity(device_map[thr_id], __func__, intensity), (max_nonce - first_nonce)); // 19=256*256*8;
const uint32_t throughput = min(device_intensity(device_map[thr_id], __func__, intensity), (max_nonce - first_nonce)) & 0xfffffc00; // 19=256*256*8;

static bool init[MAX_GPUS] = { false };
if(!init[thr_id])
Expand Down
2 changes: 1 addition & 1 deletion cuda_nist5.cu
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extern int scanhash_nist5(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];

uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << 20); // 256*256*16
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0Fu;
Expand Down
2 changes: 1 addition & 1 deletion fuguecoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern int scanhash_fugue256(int thr_id, uint32_t *pdata, uint32_t *ptarget,
uint32_t start_nonce = pdata[19]++;
unsigned int intensity = (device_sm[device_map[thr_id]] > 500) ? 22 : 19;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << intensity); // 256*256*8
throughput = min(throughput, max_nonce - start_nonce);
throughput = min(throughput, max_nonce - start_nonce) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0xf;
Expand Down
2 changes: 1 addition & 1 deletion groestlcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern int scanhash_groestlcoin(int thr_id, uint32_t *pdata, uint32_t *ptarget,
uint32_t start_nonce = pdata[19]++;
unsigned int intensity = (device_sm[device_map[thr_id]] > 500) ? 24 : 23;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << intensity);
throughput = min(throughput, max_nonce - start_nonce);
throughput = min(throughput, max_nonce - start_nonce) & 0xfffffc00;

uint32_t *outputHash = (uint32_t*)malloc(throughput * 16 * sizeof(uint32_t));

Expand Down
2 changes: 1 addition & 1 deletion heavy/heavy.cu
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ int scanhash_heavy(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];
// CUDA will process thousands of threads.
uint32_t throughput = device_intensity(device_map[thr_id], __func__, (1U << 19) - 256);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

int rc = 0;
uint32_t *hash = NULL;
Expand Down
2 changes: 1 addition & 1 deletion myriadgroestl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern int scanhash_myriad(int thr_id, uint32_t *pdata, uint32_t *ptarget,
{
uint32_t start_nonce = pdata[19]++;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << 20);
throughput = min(throughput, max_nonce - start_nonce);
throughput = min(throughput, max_nonce - start_nonce) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0000ff;
Expand Down
2 changes: 1 addition & 1 deletion neoscrypt/neoscrypt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int scanhash_neoscrypt(bool stratum, int thr_id, uint32_t *pdata,


uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

CUDA_SAFE_CALL(cudaSetDevice(device_map[thr_id]));
cudaSetDeviceFlags(cudaDeviceScheduleBlockingSync);
Expand Down
2 changes: 1 addition & 1 deletion pentablake.cu
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ extern int scanhash_pentablake(int thr_id, uint32_t *pdata, uint32_t *ptarget,
uint32_t endiandata[20];
int rc = 0;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 128U * 2560); // 18.5
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x000F;
Expand Down
2 changes: 1 addition & 1 deletion quark/animecoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ extern int scanhash_anime(int thr_id, uint32_t *pdata,
{
const uint32_t first_nonce = pdata[19];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << 20); // 256*256*8
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x00ff;
Expand Down
2 changes: 1 addition & 1 deletion quark/quarkcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ extern int scanhash_quark(int thr_id, uint32_t *pdata,
uint32_t intensity = 1 << 22;
intensity = intensity + ((1 << 22)*9/10);
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 256*4096
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0ff;
Expand Down
2 changes: 1 addition & 1 deletion qubit/deep.cu
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extern int scanhash_deep(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << 19); // 256*256*8
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x00ff;
Expand Down
2 changes: 1 addition & 1 deletion qubit/doom.cu
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern int scanhash_doom(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << 22); // 256*256*8*8
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0000f;
Expand Down
2 changes: 1 addition & 1 deletion qubit/qubit.cu
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ extern int scanhash_qubit(int thr_id, uint32_t *pdata,
}
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity);

throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0000ff;
Expand Down
2 changes: 1 addition & 1 deletion skein.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int scanhash_skeincoin(int thr_id, uint32_t *pdata,

uint32_t intensity = (device_sm[device_map[thr_id]] > 500) ? 1 << 28 : 1 << 27;;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 256*4096
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;

if (opt_benchmark)
{
Expand Down
2 changes: 1 addition & 1 deletion x11/fresh.cu
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern int scanhash_fresh(int thr_id, uint32_t *pdata,
uint32_t endiandata[20];

uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << 19);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;

if (opt_benchmark)
Expand Down
2 changes: 1 addition & 1 deletion x11/s3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern int scanhash_s3(int thr_id, uint32_t *pdata,
intensity--;
#endif
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1 << intensity);
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;
if (opt_benchmark)
ptarget[7] = 0x0000000fu;
Expand Down
2 changes: 1 addition & 1 deletion x11/x11.cu
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extern int scanhash_x11(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];

uint32_t intensity = (device_sm[device_map[thr_id]] > 500) ? 256 * 256 * 22 : 256 * 128 * 39;
const uint32_t throughput = min(device_intensity(device_map[thr_id], __func__, intensity), (max_nonce - first_nonce)); // 19=256*256*8;
const uint32_t throughput = min(device_intensity(device_map[thr_id], __func__, intensity), (max_nonce - first_nonce)) & 0xfffffc00; // 19=256*256*8;
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;

if (opt_benchmark)
Expand Down
2 changes: 1 addition & 1 deletion x13/x13.cu
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ extern int scanhash_x13(int thr_id, uint32_t *pdata,
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity);
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;

throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0xff;
Expand Down
2 changes: 1 addition & 1 deletion x15/whirlpool.cu
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern int scanhash_whc(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, 1U << 20); // 19=256*256*8;
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x0000ff;
Expand Down
2 changes: 1 addition & 1 deletion x15/whirlpoolx.cu
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int scanhash_whirlpoolx(int thr_id, uint32_t *pdata, uint32_t *ptarget, uint32_t
const uint32_t first_nonce = pdata[19];
uint32_t endiandata[20];
uint32_t throughput = device_intensity(device_map[thr_id], __func__, (1 << 27));
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x5;
Expand Down
2 changes: 1 addition & 1 deletion x15/x14.cu
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ extern int scanhash_x14(int thr_id, uint32_t *pdata,
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;

uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 19=256*256*8;
throughput = min(throughput, max_nonce - first_nonce);
throughput = min(throughput, max_nonce - first_nonce) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x000f;
Expand Down
2 changes: 1 addition & 1 deletion x15/x15.cu
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extern int scanhash_x15(int thr_id, uint32_t *pdata,
int intensity = 256 * 256 * 13;
if (device_sm[device_map[thr_id]] == 520) intensity = 256 * 256 * 22;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 19=256*256*8;
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;

if (opt_benchmark)
Expand Down
2 changes: 1 addition & 1 deletion x17/x17.cu
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ extern int scanhash_x17(int thr_id, uint32_t *pdata,
uint32_t simdthreads = (device_sm[device_map[thr_id]] > 500) ? 256 : 32;
if (device_sm[device_map[thr_id]] == 520) intensity = 256 * 256 * 15;
uint32_t throughput = device_intensity(device_map[thr_id], __func__, intensity); // 19=256*256*8;
throughput = min(throughput, (max_nonce - first_nonce));
throughput = min(throughput, (max_nonce - first_nonce)) & 0xfffffc00;

if (opt_benchmark)
ptarget[7] = 0x00f;
Expand Down

0 comments on commit 086bd1a

Please sign in to comment.