Commit 338f6d5788cbebddc0e4dd92b34933f76c527492

Con Kolivas 2012-03-04T10:47:23

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

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
 	}