Clean up use of any() by diablo and poclbm kernels.
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
diff --git a/diablo120222.cl b/diablo120222.cl
index 56674ae..dc96740 100644
--- a/diablo120222.cl
+++ b/diablo120222.cl
@@ -1309,31 +1309,19 @@ ZA[10]+=ZA[17];
ZA[10]+=ZR25(ZA[14]);
ZA[10]+=ZA[6];
ZA[10]+=ZR26(ZA[15]);
-ZA[10]+=0xEC9FCD13U;
- bool result = any(!ZA[10]);
-
- if (result) {
- if (!ZA[10].x)
+ if (any(ZA[10] == 0x136032EDU)) {
+ if (ZA[10].x == 0x136032EDU)
output[FOUND] = output[NFLAG & Znonce.x] = Znonce.x;
- if (!ZA[10].y)
+ if (ZA[10].y == 0x136032EDU)
output[FOUND] = output[NFLAG & Znonce.y] = Znonce.y;
#if defined(VECTORS4)
- if (!ZA[10].z)
+ if (ZA[10].z == 0x136032EDU)
output[FOUND] = output[NFLAG & Znonce.z] = Znonce.z;
- if (!ZA[10].w)
+ if (ZA[10].w == 0x136032EDU)
output[FOUND] = output[NFLAG & Znonce.w] = Znonce.w;
#endif
}
-#elif defined(VECTORS2)
- bool result = any(!ZA[10]);
-
- if (result) {
- if (!ZA[10].x)
- output[FOUND] = output[NFLAG & Znonce.x] = Znonce.x;
- if (!ZA[10].y)
- output[FOUND] = output[NFLAG & Znonce.y] = Znonce.y;
- }
#else
if (ZA[10]+(ZCh(ZA[15],ZA[4],ZA[3])+ZA[22]+ZMa(ZA[9],ZA[5],ZA[1])+
ZR30(ZA[1])+ZR15(ZA[13])+ZA[17]+ZR25(ZA[14])+ZA[6])+ZR26(ZA[15]) == 0x136032EDU)
diff --git a/poclbm120222.cl b/poclbm120222.cl
index bdec3e5..f006112 100644
--- a/poclbm120222.cl
+++ b/poclbm120222.cl
@@ -1263,17 +1263,16 @@ Vals[4]+=Vals[0];
Vals[7]+=Vals[3];
Vals[7]+=(rotr(Vals[4],6)^rotr(Vals[4],11)^rotr(Vals[4],25));
Vals[7]+=ch(Vals[4],Vals[5],Vals[6]);
- Vals[7]+=0xEC9FCD13U;
- bool result = any(!Vals[7]);
- if (result) {
- if (!Vals[7].x)
+
+ if (any(Vals[7] == 0x136032edU)) {
+ if (Vals[7].x == 0x136032edU)
output[FOUND] = output[NFLAG & nonce.x] = nonce.x;
- if (!Vals[7].y)
+ if (Vals[7].y == 0x136032edU)
output[FOUND] = output[NFLAG & nonce.y] = nonce.y;
#if defined(VECTORS4)
- if (!Vals[7].z)
+ if (Vals[7].z == 0x136032edU)
output[FOUND] = output[NFLAG & nonce.z] = nonce.z;
- if (!Vals[7].w)
+ if (Vals[7].w == 0x136032edU)
output[FOUND] = output[NFLAG & nonce.w] = nonce.w;
#endif
}