Browse Source

Clean up use of any() by diablo and poclbm kernels.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
338f6d5788
  1. 22
      diablo120222.cl
  2. 13
      poclbm120222.cl

22
diablo120222.cl

@ -1309,31 +1309,19 @@ ZA[10]+=ZA[17];
ZA[10]+=ZR25(ZA[14]); ZA[10]+=ZR25(ZA[14]);
ZA[10]+=ZA[6]; ZA[10]+=ZA[6];
ZA[10]+=ZR26(ZA[15]); ZA[10]+=ZR26(ZA[15]);
ZA[10]+=0xEC9FCD13U;
bool result = any(!ZA[10]); if (any(ZA[10] == 0x136032EDU)) {
if (ZA[10].x == 0x136032EDU)
if (result) {
if (!ZA[10].x)
output[FOUND] = output[NFLAG & Znonce.x] = Znonce.x; 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; output[FOUND] = output[NFLAG & Znonce.y] = Znonce.y;
#if defined(VECTORS4) #if defined(VECTORS4)
if (!ZA[10].z) if (ZA[10].z == 0x136032EDU)
output[FOUND] = output[NFLAG & Znonce.z] = Znonce.z; 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; output[FOUND] = output[NFLAG & Znonce.w] = Znonce.w;
#endif #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 #else
if (ZA[10]+(ZCh(ZA[15],ZA[4],ZA[3])+ZA[22]+ZMa(ZA[9],ZA[5],ZA[1])+ 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) ZR30(ZA[1])+ZR15(ZA[13])+ZA[17]+ZR25(ZA[14])+ZA[6])+ZR26(ZA[15]) == 0x136032EDU)

13
poclbm120222.cl

@ -1263,17 +1263,16 @@ Vals[4]+=Vals[0];
Vals[7]+=Vals[3]; Vals[7]+=Vals[3];
Vals[7]+=(rotr(Vals[4],6)^rotr(Vals[4],11)^rotr(Vals[4],25)); 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]+=ch(Vals[4],Vals[5],Vals[6]);
Vals[7]+=0xEC9FCD13U;
bool result = any(!Vals[7]); if (any(Vals[7] == 0x136032edU)) {
if (result) { if (Vals[7].x == 0x136032edU)
if (!Vals[7].x)
output[FOUND] = output[NFLAG & nonce.x] = nonce.x; 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; output[FOUND] = output[NFLAG & nonce.y] = nonce.y;
#if defined(VECTORS4) #if defined(VECTORS4)
if (!Vals[7].z) if (Vals[7].z == 0x136032edU)
output[FOUND] = output[NFLAG & nonce.z] = nonce.z; 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; output[FOUND] = output[NFLAG & nonce.w] = nonce.w;
#endif #endif
} }

Loading…
Cancel
Save