mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-21 20:14:22 +00:00
intensity: sign warnings fixes min(i,u)
This commit is contained in:
parent
f5e77452f0
commit
fe4ad36b73
@ -93,7 +93,7 @@ extern "C" int scanhash_jackpot(int thr_id, uint32_t *pdata,
|
||||
((uint32_t*)ptarget)[7] = 0x000f;
|
||||
|
||||
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};
|
||||
if (!init[thr_id])
|
||||
|
@ -160,10 +160,7 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
|
||||
const uint32_t first_nonce = pdata[19]; /* to check */
|
||||
// CUDA will process thousands of threads.
|
||||
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 128*4096
|
||||
throughput = min(throughput, max_nonce - first_nonce);
|
||||
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x000000ff;
|
||||
throughput = min(throughput, (int)(max_nonce - first_nonce));
|
||||
|
||||
int rc = 0;
|
||||
uint32_t *hash = NULL;
|
||||
@ -174,6 +171,9 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
|
||||
int nrmCalls[6];
|
||||
memset(nrmCalls, 0, sizeof(int) * 6);
|
||||
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x000000ff;
|
||||
|
||||
// für jeden Hash ein individuelles Target erstellen basierend
|
||||
// auf dem höchsten Bit, das in ptarget gesetzt ist.
|
||||
int highbit = findhighbit(ptarget, 8);
|
||||
|
@ -44,7 +44,7 @@ extern "C" int scanhash_keccak256(int thr_id, uint32_t *pdata,
|
||||
((uint32_t*)ptarget)[7] = 0x0005;
|
||||
|
||||
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};
|
||||
if (!init[thr_id]) {
|
||||
|
@ -497,7 +497,7 @@ extern "C" int scanhash_pentablake(int thr_id, uint32_t *pdata, const uint32_t *
|
||||
uint32_t endiandata[20];
|
||||
int rc = 0;
|
||||
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) {
|
||||
// possible extra result found in previous call
|
||||
|
@ -163,15 +163,13 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,
|
||||
unsigned long *hashes_done)
|
||||
{
|
||||
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)
|
||||
((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])
|
||||
{
|
||||
cudaSetDevice(device_map[thr_id]);
|
||||
@ -260,6 +258,7 @@ extern "C" int scanhash_anime(int thr_id, uint32_t *pdata,
|
||||
if (foundNonce != 0xffffffff)
|
||||
{
|
||||
uint32_t vhash64[8];
|
||||
const uint32_t Htarg = ptarget[7];
|
||||
be32enc(&endiandata[19], foundNonce);
|
||||
animehash(vhash64, endiandata);
|
||||
|
||||
|
@ -133,10 +133,10 @@ extern "C" int scanhash_quark(int thr_id, uint32_t *pdata,
|
||||
unsigned long *hashes_done)
|
||||
{
|
||||
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
|
||||
throughput = min(throughput, max_nonce - first_nonce);
|
||||
throughput = min(throughput, (int)(max_nonce - first_nonce));
|
||||
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x00F;
|
||||
|
@ -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};
|
||||
uint32_t endiandata[20];
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x0000f;
|
||||
|
@ -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};
|
||||
uint32_t endiandata[20];
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x0000f;
|
||||
|
@ -80,7 +80,7 @@ extern "C" int scanhash_qubit(int thr_id, uint32_t *pdata,
|
||||
uint32_t endiandata[20];
|
||||
const uint32_t first_nonce = pdata[19];
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x0000ff;
|
||||
|
@ -77,7 +77,7 @@ extern "C" int scanhash_fresh(int thr_id, uint32_t *pdata,
|
||||
uint32_t endiandata[20];
|
||||
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x00ff;
|
||||
|
10
x11/s3.cu
10
x11/s3.cu
@ -55,15 +55,15 @@ extern "C" int scanhash_s3(int thr_id, uint32_t *pdata,
|
||||
unsigned long *hashes_done)
|
||||
{
|
||||
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
|
||||
// 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
|
||||
int throughput = opt_work_size ? opt_work_size : (1 << 20); // 256*256*8*2;
|
||||
int intensity = 20; // 256*256*8*2;
|
||||
#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)
|
||||
((uint32_t*)ptarget)[7] = 0xF;
|
||||
|
@ -137,7 +137,7 @@ extern "C" int scanhash_x11(int thr_id, uint32_t *pdata,
|
||||
static bool init[8] = { 0 };
|
||||
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;
|
||||
throughput = min(throughput, max_nonce - first_nonce);
|
||||
throughput = min(throughput, (int)(max_nonce - first_nonce));
|
||||
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x000f;
|
||||
|
@ -155,7 +155,7 @@ extern "C" int scanhash_x13(int thr_id, uint32_t *pdata,
|
||||
const uint32_t first_nonce = pdata[19];
|
||||
static bool init[8] = { 0 };
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x000f;
|
||||
|
@ -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};
|
||||
uint32_t endiandata[20];
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x0000ff;
|
||||
|
@ -167,7 +167,7 @@ extern "C" int scanhash_x14(int thr_id, uint32_t *pdata,
|
||||
static bool init[8] = { 0 };
|
||||
uint32_t endiandata[20];
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x000f;
|
||||
|
@ -177,7 +177,7 @@ extern "C" int scanhash_x15(int thr_id, uint32_t *pdata,
|
||||
uint32_t endiandata[20];
|
||||
|
||||
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)
|
||||
((uint32_t*)ptarget)[7] = 0x00FF;
|
||||
|
@ -193,12 +193,12 @@ extern "C" int scanhash_x17(int thr_id, uint32_t *pdata,
|
||||
unsigned long *hashes_done)
|
||||
{
|
||||
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;
|
||||
throughput = min(throughput, max_nonce - first_nonce);
|
||||
throughput = min(throughput, (int)(max_nonce - first_nonce));
|
||||
|
||||
if (opt_benchmark)
|
||||
((uint32_t*)ptarget)[7] = 0x00FF;
|
||||
((uint32_t*)ptarget)[7] = 0x00ff;
|
||||
|
||||
if (!init[thr_id])
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user