Move macros DGST_R0 - DGST_R3 to host, define dgst_size for opencl kernel from host...
[hashcat.git] / OpenCL / m10410_a0.cl
index ee8ca20..3a0f439 100644 (file)
 //too much register pressure
 //#define NEW_SIMD_CODE
 
-#include "include/constants.h"
-#include "include/kernel_vendor.h"
-
-#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_vendor.cl"
+#include "inc_hash_constants.h"
+#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 padding[8] =
 {
@@ -61,7 +55,9 @@ void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 data[4])
 
   __local u32 *ptr = (__local u32 *) rc4_key->S;
 
+  #ifdef _unroll
   #pragma unroll
+  #endif
   for (u32 i = 0; i < 64; i++)
   {
     ptr[i] = v; v += a;
@@ -75,7 +71,9 @@ void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 data[4])
 
   u32 j = 0;
 
+  #ifdef _unroll
   #pragma unroll
+  #endif
   for (u32 i = 0; i < 255; i += 5)
   {
     j += rc4_key->S[i + 0] + d0; swap (rc4_key, i + 0, j);
@@ -90,7 +88,9 @@ void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 data[4])
 
 u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, __constant u32 *in, u32 out[4])
 {
-  #pragma unroll 4
+  #ifdef _unroll
+  #pragma unroll
+  #endif
   for (u32 k = 0; k < 4; k++)
   {
     u32 xor4 = 0;