From ba5fb80a3890d25a448286ebcd5215c55bac2f5d Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 23 Feb 2017 15:18:41 +0100 Subject: [PATCH] Refactor kernel declarations for Skip32 to enable OSX using it --- OpenCL/m14900_a0.cl | 4 ++-- OpenCL/m14900_a1.cl | 4 ++-- OpenCL/m14900_a3.cl | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenCL/m14900_a0.cl b/OpenCL/m14900_a0.cl index cfb2b0183..387457ba9 100644 --- a/OpenCL/m14900_a0.cl +++ b/OpenCL/m14900_a0.cl @@ -51,7 +51,7 @@ __constant u8 c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u32 *out) +void g (__local u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -64,7 +64,7 @@ void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u3 out[1] = g5; } -u32 skip32 (__local u8 s_ftable[256], const u32 KP, const u32 *key) +u32 skip32 (__local u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a1.cl b/OpenCL/m14900_a1.cl index 7f91ddc3e..f1db939d1 100644 --- a/OpenCL/m14900_a1.cl +++ b/OpenCL/m14900_a1.cl @@ -49,7 +49,7 @@ __constant u8 c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u32 *out) +void g (__local u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -62,7 +62,7 @@ void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u3 out[1] = g5; } -u32 skip32 (__local u8 s_ftable[256], const u32 KP, const u32 *key) +u32 skip32 (__local u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a3.cl b/OpenCL/m14900_a3.cl index 27697b96e..0ea5858f1 100644 --- a/OpenCL/m14900_a3.cl +++ b/OpenCL/m14900_a3.cl @@ -49,7 +49,7 @@ __constant u8 c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u32 *out) +void g (__local u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -62,7 +62,7 @@ void g (__local u8 s_ftable[256], const u32 *key, const int k, const u32 *wx, u3 out[1] = g5; } -u32 skip32 (__local u8 s_ftable[256], const u32 KP, const u32 *key) +u32 skip32 (__local u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; @@ -102,7 +102,7 @@ u32 skip32 (__local u8 s_ftable[256], const u32 KP, const u32 *key) return r; } -void m14900m (__local u8 s_ftable[256], u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset) +void m14900m (__local u8 *s_ftable, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset) { /** * modifier @@ -150,7 +150,7 @@ void m14900m (__local u8 s_ftable[256], u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[ } } -void m14900s (__local u8 s_ftable[256], u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset) +void m14900s (__local u8 *s_ftable, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global oldoffice01_t *oldoffice01_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset) { /** * modifier