Replace __kernel, __constant, __global and __local qualifiers with macro for better control
This commit is contained in:
@@ -28,7 +28,7 @@ typedef struct
|
||||
|
||||
} RC4_KEY;
|
||||
|
||||
DECLSPEC void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
{
|
||||
u8 tmp;
|
||||
|
||||
@@ -37,12 +37,12 @@ DECLSPEC void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
rc4_key->S[j] = tmp;
|
||||
}
|
||||
|
||||
DECLSPEC void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 *data)
|
||||
DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data)
|
||||
{
|
||||
u32 v = 0x03020100;
|
||||
u32 a = 0x04040404;
|
||||
|
||||
__local u32 *ptr = (__local u32 *) rc4_key->S;
|
||||
LOCAL_AS u32 *ptr = (LOCAL_AS u32 *) rc4_key->S;
|
||||
|
||||
#ifdef _unroll
|
||||
#pragma unroll
|
||||
@@ -90,7 +90,7 @@ DECLSPEC void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 *data)
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out)
|
||||
DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out)
|
||||
{
|
||||
#ifdef _unroll
|
||||
#pragma unroll
|
||||
@@ -143,7 +143,7 @@ DECLSPEC u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u3
|
||||
return j;
|
||||
}
|
||||
|
||||
DECLSPEC void m09800m (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t))
|
||||
DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
@@ -156,7 +156,7 @@ DECLSPEC void m09800m (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32
|
||||
* shared
|
||||
*/
|
||||
|
||||
__local RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
|
||||
/**
|
||||
* salt
|
||||
@@ -311,7 +311,7 @@ DECLSPEC void m09800m (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void m09800s (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t))
|
||||
DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
@@ -324,7 +324,7 @@ DECLSPEC void m09800s (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32
|
||||
* shared
|
||||
*/
|
||||
|
||||
__local RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
|
||||
/**
|
||||
* salt
|
||||
@@ -491,7 +491,7 @@ DECLSPEC void m09800s (__local RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -535,12 +535,12 @@ __kernel void m09800_m04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
__kernel void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -584,12 +584,12 @@ __kernel void m09800_m08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
__kernel void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -633,12 +633,12 @@ __kernel void m09800_m16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800m (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
__kernel void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -682,12 +682,12 @@ __kernel void m09800_s04 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
__kernel void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -731,12 +731,12 @@ __kernel void m09800_s08 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
__kernel void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
KERNEL_FQ void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
{
|
||||
/**
|
||||
* base
|
||||
@@ -780,7 +780,7 @@ __kernel void m09800_s16 (KERN_ATTR_ESALT (oldoffice34_t))
|
||||
* main
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
m09800s (rc4_keys, w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, combs_mode, gid_max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user