Use the unrolled option for no vectors return code.
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
diff --git a/diablo120222.cl b/diablo120222.cl
index 06c36c9..0035a47 100644
--- a/diablo120222.cl
+++ b/diablo120222.cl
@@ -511,35 +511,40 @@ ZA[1]=ZA[16]+ZMa(ZA[5],ZA[7],ZA[9])+ZR30(ZA[9]);
ZA[3]+=(ZCh(ZA[10],ZA[15],ZA[4])+ZA[5]+ZA[12]+0x78a5636fU)+ZR26(ZA[10]);
ZA[4]+=(ZCh(ZA[3],ZA[10],ZA[15])+ZA[9]+ZA[13]+0x84c87814U)+ZR26(ZA[3]);
ZA[15]+=(ZCh(ZA[4],ZA[3],ZA[10])+ZA[1]+ZR15(ZA[12])+ZA[0]+ZR25(ZA[6])+ZA[11]+0x8cc70208U)+ZR26(ZA[4]);
-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]);
+
+
#define FOUND (0x80)
#define NFLAG (0x7F)
-#if defined(VECTORS4)
- bool result = any(ZA[10] == 0x136032EDU);
+#if defined(VECTORS2) || defined(VECTORS4)
+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;
+ bool result = any(!ZA[10]);
if (result) {
- if (ZA[10].x == 0x136032EDU)
+ if (!ZA[10].x)
output[FOUND] = output[NFLAG & Znonce.x] = Znonce.x;
- if (ZA[10].y == 0x136032EDU)
+ if (!ZA[10].y)
output[FOUND] = output[NFLAG & Znonce.y] = Znonce.y;
- if (ZA[10].z == 0x136032EDU)
+#if defined(VECTORS4)
+ if (!ZA[10].z)
output[FOUND] = output[NFLAG & Znonce.z] = Znonce.z;
- if (ZA[10].w == 0x136032EDU)
+ if (!ZA[10].w)
output[FOUND] = output[NFLAG & Znonce.w] = Znonce.w;
+#endif
}
#elif defined(VECTORS2)
- bool result = any(ZA[10] == 0x136032EDU);
+ bool result = any(!ZA[10]);
if (result) {
- if (ZA[10].x == 0x136032EDU)
+ if (!ZA[10].x)
output[FOUND] = output[NFLAG & Znonce.x] = Znonce.x;
- if (ZA[10].y == 0x136032EDU)
+ if (!ZA[10].y)
output[FOUND] = output[NFLAG & Znonce.y] = Znonce.y;
}
#else
- if (ZA[10] == 0x136032EDU)
- output[FOUND] = output[NFLAG & Znonce] = Znonce;
+ 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)
+ output[FOUND] = output[NFLAG & Znonce] = Znonce;
#endif
}
diff --git a/poclbm120222.cl b/poclbm120222.cl
index 03e9d5d..a40f18b 100644
--- a/poclbm120222.cl
+++ b/poclbm120222.cl
@@ -1245,31 +1245,18 @@ Vals[4]+=Vals[0];
#define NFLAG (0x7F)
#if defined(VECTORS2) || defined(VECTORS4)
- bool result = any((Vals[7]+
- Ma(Vals[2],Vals[0],Vals[1])+
- (rotr(Vals[0],2)^rotr(Vals[0],13)^rotr(Vals[0],22))+
- W[12]+
- (rotr(W[13],7)^rotr(W[13],18)^(W[13]>>3U))+
- W[5]+
- (rotr(W[10],17)^rotr(W[10],19)^(W[10]>>10U))+
- Vals[3]+
- (rotr(Vals[4],6)^rotr(Vals[4],11)^rotr(Vals[4],25))+
- ch(Vals[4],Vals[5],Vals[6])-
- 0x136032edU) == 0);
+ Vals[7]+=Ma(Vals[2],Vals[0],Vals[1]);
+ Vals[7]+=(rotr(Vals[0],2)^rotr(Vals[0],13)^rotr(Vals[0],22));
+ Vals[7]+=W[12];
+ Vals[7]+=(rotr(W[13],7)^rotr(W[13],18)^(W[13]>>3U));
+ Vals[7]+=W[5];
+ Vals[7]+=(rotr(W[10],17)^rotr(W[10],19)^(W[10]>>10U));
+ 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] ^= 0x136032edU;
+ bool result = any(!Vals[7]);
if (result) {
- // Repeating this seems crazy but it's faster than setting the
- // Vals[7] variable on all non-matches.
- Vals[7]+=Ma(Vals[2],Vals[0],Vals[1]);
- Vals[7]+=(rotr(Vals[0],2)^rotr(Vals[0],13)^rotr(Vals[0],22));
- Vals[7]+=W[12];
- Vals[7]+=(rotr(W[13],7)^rotr(W[13],18)^(W[13]>>3U));
- Vals[7]+=W[5];
- Vals[7]+=(rotr(W[10],17)^rotr(W[10],19)^(W[10]>>10U));
- 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] ^= 0x136032edU;
-
if (!Vals[7].x)
output[FOUND] = output[NFLAG & nonce.x] = nonce.x;
if (!Vals[7].y)