1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

phatk prefers to have the check unrolled instead of using any() since it's already zeroed.

This commit is contained in:
Con Kolivas 2012-02-24 00:29:55 +11:00
parent f635ac4981
commit 6f8822be0d

View File

@ -379,8 +379,8 @@ void search( const uint state0, const uint state1, const uint state2, const uint
#define NFLAG (0x7F) #define NFLAG (0x7F)
#ifdef VECTORS4 #ifdef VECTORS4
bool result = any(W[117] == 0); bool result = W[117].x & W[117].y & W[117].z & W[117].w;
if (result) { if (!result) {
output[FOUND] = FOUND; output[FOUND] = FOUND;
if (!W[117].x) if (!W[117].x)
output[NFLAG & W[3].x] = W[3].x; output[NFLAG & W[3].x] = W[3].x;
@ -392,8 +392,8 @@ void search( const uint state0, const uint state1, const uint state2, const uint
output[NFLAG & W[3].w] = W[3].w; output[NFLAG & W[3].w] = W[3].w;
} }
#elif defined VECTORS2 #elif defined VECTORS2
bool result = any(W[117] == 0); bool result = W[117].x & W[117].y;
if (result) { if (!result) {
output[FOUND] = FOUND; output[FOUND] = FOUND;
if (!W[117].x) if (!W[117].x)
output[NFLAG & W[3].x] = W[3].x; output[NFLAG & W[3].x] = W[3].x;
@ -401,7 +401,7 @@ void search( const uint state0, const uint state1, const uint state2, const uint
output[NFLAG & W[3].y] = W[3].y; output[NFLAG & W[3].y] = W[3].y;
} }
#else #else
if (W[117] == 0) if (!W[117])
output[FOUND] = output[NFLAG & W[3]] = W[3]; output[FOUND] = output[NFLAG & W[3]] = W[3];
#endif #endif
} }