From 6f8822be0dce22cfcdc71b4599555a3d5313c668 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 24 Feb 2012 00:29:55 +1100 Subject: [PATCH] phatk prefers to have the check unrolled instead of using any() since it's already zeroed. --- phatk120222.cl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phatk120222.cl b/phatk120222.cl index 0072217c..4e548117 100644 --- a/phatk120222.cl +++ b/phatk120222.cl @@ -379,8 +379,8 @@ void search( const uint state0, const uint state1, const uint state2, const uint #define NFLAG (0x7F) #ifdef VECTORS4 - bool result = any(W[117] == 0); - if (result) { + bool result = W[117].x & W[117].y & W[117].z & W[117].w; + if (!result) { output[FOUND] = FOUND; if (!W[117].x) output[NFLAG & W[3].x] = W[3].x; @@ -392,8 +392,8 @@ void search( const uint state0, const uint state1, const uint state2, const uint output[NFLAG & W[3].w] = W[3].w; } #elif defined VECTORS2 - bool result = any(W[117] == 0); - if (result) { + bool result = W[117].x & W[117].y; + if (!result) { output[FOUND] = FOUND; if (!W[117].x) output[NFLAG & W[3].x] = W[3].x; @@ -401,7 +401,7 @@ void search( const uint state0, const uint state1, const uint state2, const uint output[NFLAG & W[3].y] = W[3].y; } #else - if (W[117] == 0) + if (!W[117]) output[FOUND] = output[NFLAG & W[3]] = W[3]; #endif }