From b0a01be319acd0d9cc02fa8f4917f3a2a5edc8d3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 24 Feb 2012 09:34:50 +1100 Subject: [PATCH] Revert use of any() in output code in poclbm kernel. Slower. --- poclbm120222.cl | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/poclbm120222.cl b/poclbm120222.cl index b0862707..e7ba623e 100644 --- a/poclbm120222.cl +++ b/poclbm120222.cl @@ -1256,28 +1256,32 @@ Vals[7]+=ch(Vals[0],Vals[1],Vals[2]); #define NFLAG (0x7F) #if defined(VECTORS4) - bool result = any(Vals[7] == 0x136032edU); + Vals[7] ^= 0x136032edU; - if (result) { + bool result = Vals[7].x & Vals[7].y & Vals[7].z & Vals[7].w; + + if (!result) { output[FOUND] = FOUND; - if (Vals[7].x == 0x136032edU) - output[NFLAG & nonce.x] = nonce.x; - if (Vals[7].y == 0x136032edU) - output[NFLAG & nonce.y] = nonce.y; - if (Vals[7].z == 0x136032edU) - output[NFLAG & nonce.z] = nonce.z; - if (Vals[7].w == 0x136032edU) - output[NFLAG & nonce.w] = nonce.w; + if (!Vals[7].x) + output[NFLAG & nonce.x] = nonce.x; + if (!Vals[7].y) + output[NFLAG & nonce.y] = nonce.y; + if (!Vals[7].z) + output[NFLAG & nonce.z] = nonce.z; + if (!Vals[7].w) + output[NFLAG & nonce.w] = nonce.w; } -#elif defined(VECTORS2) - bool result = any(Vals[7] == 0x136032edU); +#elif defined VECTORS2 + Vals[7] ^= 0x136032edU; + + bool result = Vals[7].x & Vals[7].y; - if (result) { + if (!result) { output[FOUND] = FOUND; - if (Vals[7].x == 0x136032edU) - output[NFLAG & nonce.x] = nonce.x; - if (Vals[7].y == 0x136032edU) - output[NFLAG & nonce.y] = nonce.y; + if (!Vals[7].x) + output[FOUND] = output[NFLAG & nonce.x] = nonce.x; + if (!Vals[7].y) + output[FOUND] = output[NFLAG & nonce.y] = nonce.y; } #else if (Vals[7] == 0x136032EDU)