mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-11 07:17:53 +00:00
blake: +8MH/s on linux, weird optimisation
Like doom/luffa, using a int pos make the proc faster
This commit is contained in:
parent
23f0cee61f
commit
347d4e4928
@ -241,13 +241,18 @@ void blake256_gpu_hash_80(uint32_t threads, uint32_t startNounce, uint32_t *resN
|
|||||||
|
|
||||||
blake256_compress(h, ending, 640, blakerounds);
|
blake256_compress(h, ending, 640, blakerounds);
|
||||||
|
|
||||||
|
int pos = -1;
|
||||||
|
#pragma unroll 8
|
||||||
for (int i = 7; i >= 0; i--) {
|
for (int i = 7; i >= 0; i--) {
|
||||||
uint32_t hash = cuda_swab32(h[i]);
|
uint32_t hash = cuda_swab32(h[i]);
|
||||||
if (hash > c_Target[i]) {
|
if (hash > c_Target[i]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hash < c_Target[i]) {
|
if (hash < c_Target[i]) {
|
||||||
break;
|
/* dont ask me why, we lose 8MH/s in perfs
|
||||||
|
without the int variable */
|
||||||
|
if (pos < i) pos = i;
|
||||||
|
//break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +387,7 @@ extern "C" int scanhash_blake256(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 - first_nonce + 1;
|
pdata[19] = max_nonce;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1453,7 +1453,7 @@ out:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PROGRAM_VERSION "1.4.3"
|
#define PROGRAM_VERSION "1.4.4"
|
||||||
static void show_version_and_exit(void)
|
static void show_version_and_exit(void)
|
||||||
{
|
{
|
||||||
printf("%s v%s\n"
|
printf("%s v%s\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user