|
|
@ -909,7 +909,8 @@ __attribute__((reqd_work_group_size(WORKSIZE, 1, 1))) |
|
|
|
__kernel void search12(__global hash_t* hashes, __global uint* output, const ulong target) |
|
|
|
__kernel void search12(__global hash_t* hashes, __global uint* output, const ulong target) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint gid = get_global_id(0); |
|
|
|
uint gid = get_global_id(0); |
|
|
|
__global hash_t *hash = &(hashes[gid-get_global_offset(0)]); |
|
|
|
uint offset = get_global_offset(0); |
|
|
|
|
|
|
|
__global hash_t *hash = &(hashes[gid-offset]); |
|
|
|
|
|
|
|
|
|
|
|
//mixtab |
|
|
|
//mixtab |
|
|
|
__local sph_u32 mixtab0[256], mixtab1[256], mixtab2[256], mixtab3[256]; |
|
|
|
__local sph_u32 mixtab0[256], mixtab1[256], mixtab2[256], mixtab3[256]; |
|
|
@ -922,7 +923,8 @@ __kernel void search12(__global hash_t* hashes, __global uint* output, const ulo |
|
|
|
mixtab2[i] = mixtab2_c[i]; |
|
|
|
mixtab2[i] = mixtab2_c[i]; |
|
|
|
mixtab3[i] = mixtab3_c[i]; |
|
|
|
mixtab3[i] = mixtab3_c[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
barrier(CLK_LOCAL_MEM_FENCE); |
|
|
|
barrier(CLK_GLOBAL_MEM_FENCE); |
|
|
|
|
|
|
|
|
|
|
|
// fugue |
|
|
|
// fugue |
|
|
|
sph_u32 S00, S01, S02, S03, S04, S05, S06, S07, S08, S09; |
|
|
|
sph_u32 S00, S01, S02, S03, S04, S05, S06, S07, S08, S09; |
|
|
|
sph_u32 S10, S11, S12, S13, S14, S15, S16, S17, S18, S19; |
|
|
|
sph_u32 S10, S11, S12, S13, S14, S15, S16, S17, S18, S19; |
|
|
@ -947,12 +949,15 @@ __kernel void search12(__global hash_t* hashes, __global uint* output, const ulo |
|
|
|
// apply round shift if necessary |
|
|
|
// apply round shift if necessary |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 32; i ++) { |
|
|
|
for (i = 0; i < 32; i ++) |
|
|
|
|
|
|
|
{ |
|
|
|
ROR3; |
|
|
|
ROR3; |
|
|
|
CMIX36(S00, S01, S02, S04, S05, S06, S18, S19, S20); |
|
|
|
CMIX36(S00, S01, S02, S04, S05, S06, S18, S19, S20); |
|
|
|
SMIX(S00, S01, S02, S03); |
|
|
|
SMIX(S00, S01, S02, S03); |
|
|
|
} |
|
|
|
} |
|
|
|
for (i = 0; i < 13; i ++) { |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 13; i ++) |
|
|
|
|
|
|
|
{ |
|
|
|
S04 ^= S00; |
|
|
|
S04 ^= S00; |
|
|
|
S09 ^= S00; |
|
|
|
S09 ^= S00; |
|
|
|
S18 ^= S00; |
|
|
|
S18 ^= S00; |
|
|
@ -1002,7 +1007,8 @@ __kernel void search12(__global hash_t* hashes, __global uint* output, const ulo |
|
|
|
|
|
|
|
|
|
|
|
bool result = (hash->h8[3] <= target); |
|
|
|
bool result = (hash->h8[3] <= target); |
|
|
|
if (result) |
|
|
|
if (result) |
|
|
|
output[output[0xFF]++] = SWAP4(gid); |
|
|
|
output[atomic_inc(output+0xFF)] = SWAP4(gid); |
|
|
|
|
|
|
|
|
|
|
|
barrier(CLK_GLOBAL_MEM_FENCE); |
|
|
|
barrier(CLK_GLOBAL_MEM_FENCE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|