Browse Source

intensity: sign warnings fixes min(i,u)

2upstream
Tanguy Pruvot 10 years ago
parent
commit
fe4ad36b73
  1. 2
      JHA/jackpotcoin.cu
  2. 8
      heavy/heavy.cu
  3. 2
      keccak/keccak256.cu
  4. 2
      pentablake.cu
  5. 9
      quark/animecoin.cu
  6. 4
      quark/quarkcoin.cu
  7. 2
      qubit/deep.cu
  8. 2
      qubit/doom.cu
  9. 2
      qubit/qubit.cu
  10. 2
      x11/fresh.cu
  11. 10
      x11/s3.cu
  12. 2
      x11/x11.cu
  13. 2
      x13/x13.cu
  14. 2
      x15/whirlpool.cu
  15. 2
      x15/x14.cu
  16. 2
      x15/x15.cu
  17. 6
      x17/x17.cu

2
JHA/jackpotcoin.cu

@ -93,7 +93,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
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = {0,0,0,0,0,0,0,0};
if (!init[thr_id]) if (!init[thr_id])

8
heavy/heavy.cu

@ -160,10 +160,7 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
const uint32_t first_nonce = pdata[19]; /* to check */ const uint32_t first_nonce = pdata[19]; /* to check */
// CUDA will process thousands of threads. // CUDA will process thousands of threads.
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 128*4096 int throughput = opt_work_size ? opt_work_size : (1 << 19); // 128*4096
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000000ff;
int rc = 0; int rc = 0;
uint32_t *hash = NULL; uint32_t *hash = NULL;
@ -174,6 +171,9 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
int nrmCalls[6]; int nrmCalls[6];
memset(nrmCalls, 0, sizeof(int) * 6); memset(nrmCalls, 0, sizeof(int) * 6);
if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000000ff;
// für jeden Hash ein individuelles Target erstellen basierend // für jeden Hash ein individuelles Target erstellen basierend
// auf dem höchsten Bit, das in ptarget gesetzt ist. // auf dem höchsten Bit, das in ptarget gesetzt ist.
int highbit = findhighbit(ptarget, 8); int highbit = findhighbit(ptarget, 8);

2
keccak/keccak256.cu

@ -44,7 +44,7 @@ extern "C" int scanhash_keccak256(int thr_id, uint32_t *pdata,
((uint32_t*)ptarget)[7] = 0x0005; ((uint32_t*)ptarget)[7] = 0x0005;
int throughput = opt_work_size ? opt_work_size : (1 << 21); // 256*256*8*4 int throughput = opt_work_size ? opt_work_size : (1 << 21); // 256*256*8*4
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = {0,0,0,0,0,0,0,0};
if (!init[thr_id]) { if (!init[thr_id]) {

2
pentablake.cu

@ -497,7 +497,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
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (extra_results[0] != MAXU) { if (extra_results[0] != MAXU) {
// possible extra result found in previous call // possible extra result found in previous call

9
quark/animecoin.cu

@ -163,15 +163,13 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,
unsigned long *hashes_done) unsigned long *hashes_done)
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
static bool init[8] = { 0 };
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*2048
throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00000f; ((uint32_t*)ptarget)[7] = 0x00000f;
const uint32_t Htarg = ptarget[7];
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*2048
throughput = min(throughput, max_nonce - first_nonce);
static bool init[8] = {0,0,0,0,0,0,0,0};
if (!init[thr_id]) if (!init[thr_id])
{ {
cudaSetDevice(device_map[thr_id]); cudaSetDevice(device_map[thr_id]);
@ -260,6 +258,7 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,
if (foundNonce != 0xffffffff) if (foundNonce != 0xffffffff)
{ {
uint32_t vhash64[8]; uint32_t vhash64[8];
const uint32_t Htarg = ptarget[7];
be32enc(&endiandata[19], foundNonce); be32enc(&endiandata[19], foundNonce);
animehash(vhash64, endiandata); animehash(vhash64, endiandata);

4
quark/quarkcoin.cu

@ -133,10 +133,10 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
unsigned long *hashes_done) unsigned long *hashes_done)
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = { 0 };
int 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, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00F; ((uint32_t*)ptarget)[7] = 0x00F;

2
qubit/deep.cu

@ -61,7 +61,7 @@ extern "C" int scanhash_deep(int thr_id, uint32_t *pdata,
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = {0,0,0,0,0,0,0,0};
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
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x0000f; ((uint32_t*)ptarget)[7] = 0x0000f;

2
qubit/doom.cu

@ -41,7 +41,7 @@ extern "C" int scanhash_doom(int thr_id, uint32_t *pdata,
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = {0,0,0,0,0,0,0,0};
uint32_t endiandata[20]; uint32_t endiandata[20];
int throughput = opt_work_size ? opt_work_size : (1 << 22); // 256*256*8*8 int throughput = opt_work_size ? opt_work_size : (1 << 22); // 256*256*8*8
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x0000f; ((uint32_t*)ptarget)[7] = 0x0000f;

2
qubit/qubit.cu

@ -80,7 +80,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
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x0000ff; ((uint32_t*)ptarget)[7] = 0x0000ff;

2
x11/fresh.cu

@ -77,7 +77,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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int) (max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00ff; ((uint32_t*)ptarget)[7] = 0x00ff;

10
x11/s3.cu

@ -55,15 +55,15 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
unsigned long *hashes_done) unsigned long *hashes_done)
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
static bool init[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static bool init[8] = { 0 };
#ifdef WIN32 #ifdef WIN32
// reduce a bit the intensity on windows // reduce a bit the intensity on windows
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 256*256*8; int intensity = 19; // 256*256*8;
#else #else
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*256*8*2; int intensity = 20; // 256*256*8*2;
#endif #endif
throughput = min(throughput, max_nonce - first_nonce); int throughput = opt_work_size ? opt_work_size : (1 << intensity);
throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0xF; ((uint32_t*)ptarget)[7] = 0xF;

2
x11/x11.cu

@ -137,7 +137,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata,
static bool init[8] = { 0 }; static bool init[8] = { 0 };
int intensity = (device_sm[device_map[thr_id]] >= 500) ? 20 : 19; int intensity = (device_sm[device_map[thr_id]] >= 500) ? 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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000f; ((uint32_t*)ptarget)[7] = 0x000f;

2
x13/x13.cu

@ -155,7 +155,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];
static bool init[8] = { 0 }; static bool init[8] = { 0 };
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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000f; ((uint32_t*)ptarget)[7] = 0x000f;

2
x15/whirlpool.cu

@ -57,7 +57,7 @@ extern "C" int scanhash_whc(int thr_id, uint32_t *pdata,
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = {0,0,0,0,0,0,0,0};
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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x0000ff; ((uint32_t*)ptarget)[7] = 0x0000ff;

2
x15/x14.cu

@ -167,7 +167,7 @@ extern "C" int scanhash_x14(int thr_id, uint32_t *pdata,
static bool init[8] = { 0 }; static bool init[8] = { 0 };
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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x000f; ((uint32_t*)ptarget)[7] = 0x000f;

2
x15/x15.cu

@ -177,7 +177,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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00FF; ((uint32_t*)ptarget)[7] = 0x00FF;

6
x17/x17.cu

@ -193,12 +193,12 @@ extern "C" int scanhash_x17(int thr_id, uint32_t *pdata,
unsigned long *hashes_done) unsigned long *hashes_done)
{ {
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
static bool init[8] = {0,0,0,0,0,0,0,0}; static bool init[8] = { 0 };
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;
throughput = min(throughput, max_nonce - first_nonce); throughput = min(throughput, (int)(max_nonce - first_nonce));
if (opt_benchmark) if (opt_benchmark)
((uint32_t*)ptarget)[7] = 0x00FF; ((uint32_t*)ptarget)[7] = 0x00ff;
if (!init[thr_id]) if (!init[thr_id])
{ {

Loading…
Cancel
Save