Revert use of any() in output code in poclbm kernel. Slower.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/poclbm120222.cl b/poclbm120222.cl
index b086270..e7ba623 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)