From 4a60ec3a97ef39d99bd5da5720706480dfcc86b7 Mon Sep 17 00:00:00 2001 From: Gabriele 'matrix' Gristina Date: Sun, 31 Jan 2016 19:08:43 +0100 Subject: [PATCH] Fixed __local in m06232 and m06233 (see PR #179 for details) --- OpenCL/m06232.cl | 10 ++++++---- OpenCL/m06233.cl | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenCL/m06232.cl b/OpenCL/m06232.cl index 0058bc8..4315f7c 100644 --- a/OpenCL/m06232.cl +++ b/OpenCL/m06232.cl @@ -1,5 +1,7 @@ /** - * Author......: Jens Steube + * Authors.....: Jens Steube + * Gabriele Gristina + * * License.....: MIT */ @@ -1089,7 +1091,7 @@ __constant u32 Cl[8][256] = #define BOX(S,n,i) (S)[(n)][(i)] -static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { const u32 rch[R + 1] = { @@ -1285,7 +1287,7 @@ static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 s_Ch dgst[15] ^= statel[7] ^ w[15]; } -static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], const u32 opad[16], u32 dgst[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], const u32 opad[16], u32 dgst[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { dgst[ 0] = ipad[ 0]; dgst[ 1] = ipad[ 1]; @@ -1365,7 +1367,7 @@ static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], c whirlpool_transform (w, dgst, s_Ch, s_Cl); } -static void hmac_init (u32 w[16], u32 ipad[16], u32 opad[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void hmac_init (u32 w[16], u32 ipad[16], u32 opad[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { w[ 0] ^= 0x36363636; w[ 1] ^= 0x36363636; diff --git a/OpenCL/m06233.cl b/OpenCL/m06233.cl index 7df1003..16a7888 100644 --- a/OpenCL/m06233.cl +++ b/OpenCL/m06233.cl @@ -1,5 +1,7 @@ /** - * Author......: Jens Steube + * Authors.....: Jens Steube + * Gabriele Gristina + * * License.....: MIT */ @@ -1089,7 +1091,7 @@ __constant u32 Cl[8][256] = #define BOX(S,n,i) (S)[(n)][(i)] -static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { const u32 rch[R + 1] = { @@ -1285,7 +1287,7 @@ static void whirlpool_transform (const u32 w[16], u32 dgst[16], __local u32 s_Ch dgst[15] ^= statel[7] ^ w[15]; } -static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], const u32 opad[16], u32 dgst[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], const u32 opad[16], u32 dgst[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { dgst[ 0] = ipad[ 0]; dgst[ 1] = ipad[ 1]; @@ -1365,7 +1367,7 @@ static void hmac_run2 (const u32 w1[16], const u32 w2[16], const u32 ipad[16], c whirlpool_transform (w, dgst, s_Ch, s_Cl); } -static void hmac_init (u32 w[16], u32 ipad[16], u32 opad[16], __local u32 s_Ch[8][256], __local u32 s_Cl[8][256]) +static void hmac_init (u32 w[16], u32 ipad[16], u32 opad[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { w[ 0] ^= 0x36363636; w[ 1] ^= 0x36363636; -- 2.25.1