#define NEW_SIMD_CODE
-#include "include/constants.h"
-#include "include/kernel_vendor.h"
+#include "inc_hash_constants.h"
+#include "inc_vendor.cl"
#define DGST_R0 0
#define DGST_R1 1
#define DGST_R2 2
#define DGST_R3 3
-#include "include/kernel_functions.c"
-#include "OpenCL/types_ocl.c"
-#include "OpenCL/common.c"
-#include "include/rp_kernel.h"
-#include "OpenCL/rp.c"
-#include "OpenCL/simd.c"
+#include "inc_hash_functions.cl"
+#include "inc_types.cl"
+#include "inc_common.cl"
+#include "inc_rp.h"
+#include "inc_rp.cl"
+#include "inc_simd.cl"
__constant u32 c_tables[4][256] =
{
*/
u32 pw_buf0[4];
-
- pw_buf0[0] = pws[gid].i[ 0];
- pw_buf0[1] = pws[gid].i[ 1];
- pw_buf0[2] = pws[gid].i[ 2];
- pw_buf0[3] = pws[gid].i[ 3];
-
u32 pw_buf1[4];
- pw_buf1[0] = pws[gid].i[ 4];
- pw_buf1[1] = pws[gid].i[ 5];
- pw_buf1[2] = pws[gid].i[ 6];
- pw_buf1[3] = pws[gid].i[ 7];
+ pw_buf0[0] = pws[gid].i[0];
+ pw_buf0[1] = pws[gid].i[1];
+ pw_buf0[2] = pws[gid].i[2];
+ pw_buf0[3] = pws[gid].i[3];
+ pw_buf1[0] = pws[gid].i[4];
+ pw_buf1[1] = pws[gid].i[5];
+ pw_buf1[2] = pws[gid].i[6];
+ pw_buf1[3] = pws[gid].i[7];
const u32 pw_len = pws[gid].pw_len;
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
- u32x w14 = out_len * 8;
-
u32x data[8];
data[0] = w0[0];
u32x tmp[8];
- if (pw_len > 0)
+ //if (pw_len > 0) // not really SIMD compatible
{
PASS0 (state, tmp, state_m, data_m, s_tables);
PASS2 (state, tmp, state_m, data_m, s_tables);
SHIFT61 (state, data_m);
}
- data[0] = w14;
+ data[0] = out_len * 8;
data[1] = 0;
data[2] = 0;
data[3] = 0;
*/
u32 pw_buf0[4];
-
- pw_buf0[0] = pws[gid].i[ 0];
- pw_buf0[1] = pws[gid].i[ 1];
- pw_buf0[2] = pws[gid].i[ 2];
- pw_buf0[3] = pws[gid].i[ 3];
-
u32 pw_buf1[4];
- pw_buf1[0] = pws[gid].i[ 4];
- pw_buf1[1] = pws[gid].i[ 5];
- pw_buf1[2] = pws[gid].i[ 6];
- pw_buf1[3] = pws[gid].i[ 7];
+ pw_buf0[0] = pws[gid].i[0];
+ pw_buf0[1] = pws[gid].i[1];
+ pw_buf0[2] = pws[gid].i[2];
+ pw_buf0[3] = pws[gid].i[3];
+ pw_buf1[0] = pws[gid].i[4];
+ pw_buf1[1] = pws[gid].i[5];
+ pw_buf1[2] = pws[gid].i[6];
+ pw_buf1[3] = pws[gid].i[7];
const u32 pw_len = pws[gid].pw_len;
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
- u32x w14 = out_len * 8;
+ /**
+ * GOST
+ */
u32x data[8];
u32x tmp[8];
- if (pw_len > 0)
+ //if (pw_len > 0) // not really SIMD compatible
{
PASS0 (state, tmp, state_m, data_m, s_tables);
PASS2 (state, tmp, state_m, data_m, s_tables);
SHIFT61 (state, data_m);
}
- data[0] = w14;
+ data[0] = out_len * 8;
data[1] = 0;
data[2] = 0;
data[3] = 0;