//too much register pressure
//#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 "OpenCL/simd.c"
+#include "inc_hash_functions.cl"
+#include "inc_types.cl"
+#include "inc_common.cl"
+#include "inc_simd.cl"
#define INITVAL 0
},
};
-static void streebog_g (u64x h[8], const u64x m[8], __local u64 (*s_sbob_sl64)[256])
+void streebog_g (u64x h[8], const u64x m[8], __local u64 (*s_sbob_sl64)[256])
{
u64x k[8];
u64x s[8];
u64x t[8];
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
t[i] = h[i];
k[i] = SBOG_LPSti64;
}
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
s[i] = m[i];
for (int r = 0; r < 12; r++)
{
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
t[i] = s[i] ^ k[i];
}
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
s[i] = SBOG_LPSti64;
t[i] = k[i] ^ sbob_rc64[r][i];
}
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
k[i] = SBOG_LPSti64;
}
}
+ #ifdef _unroll
#pragma unroll
+ #endif
for (int i = 0; i < 8; i++)
{
h[i] ^= s[i] ^ k[i] ^ m[i];