From 009e8f31c5ce0d8ca763bbfae857e3fb90257ac8 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 16 Jul 2011 02:37:54 +1000 Subject: [PATCH] Shorten the code path in the kernel even more. --- phatk110714.cl | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/phatk110714.cl b/phatk110714.cl index e6ba9f96..5c274ddb 100644 --- a/phatk110714.cl +++ b/phatk110714.cl @@ -386,32 +386,26 @@ __kernel void search( const uint state0, const uint state1, const uint state2, c #if defined(VECTORS4) || defined(VECTORS2) if (Vals[7].x == -H[7]) { - output[W[3].x & NFLAG] = W[3].x; - output[MAXBUFFERS] = 1; + output[MAXBUFFERS] = output[NFLAG & W[3].x] = W[3].x; } if (Vals[7].y == -H[7]) { - output[W[3].y & NFLAG] = W[3].y; - output[MAXBUFFERS] = 1; + output[MAXBUFFERS] = output[NFLAG & W[3].y] = W[3].y; } #ifdef VECTORS4 if (Vals[7].z == -H[7]) { - output[W[3].z & NFLAG] = W[3].z; - output[MAXBUFFERS] = 1; + output[MAXBUFFERS] = output[NFLAG & W[3].z] = W[3].z; } if (Vals[7].w == -H[7]) { - output[W[3].w & NFLAG] = W[3].w; - output[MAXBUFFERS] = 1; + output[MAXBUFFERS] = output[NFLAG & W[3].w] = W[3].w; } #endif #else if (Vals[7] == -H[7]) { - output[W[3] & NFLAG] = W[3]; - output[MAXBUFFERS] = 1; + output[MAXBUFFERS] = output[NFLAG & W[3]] = W[3]; } #endif - -} \ No newline at end of file +}