master
Inga 🏳‍🌈 8 years ago
parent bb6275672f
commit 4bd1b36d94
  1. 2
      dotnet/WhiteRabbit.UnmanagedBridge/WhiteRabbit.UnmanagedBridge.cpp
  2. 14
      dotnet/WhiteRabbit.UnmanagedBridge/md5.cpp

@ -9,7 +9,7 @@ void WhiteRabbitUnmanagedBridge::MD5Unmanaged::ComputeMD5(unsigned __int32 * inp
{ {
#if AVX2 #if AVX2
md5(input + 0 * 8 * 8, output + 0 * 8); md5(input + 0 * 8 * 8, output + 0 * 8);
md5(input + 1 * 8 * 8, output + 0 * 8); md5(input + 1 * 8 * 8, output + 1 * 8);
#elif SIMD #elif SIMD
md5(input + 0 * 8 * 4, output + 0 * 4); md5(input + 0 * 8 * 4, output + 0 * 4);
md5(input + 1 * 8 * 4, output + 1 * 4); md5(input + 1 * 8 * 4, output + 1 * 4);

@ -19,14 +19,14 @@ typedef __m256i MD5Vector;
#define CREATE_VECTOR(a) _mm256_set1_epi32(a) #define CREATE_VECTOR(a) _mm256_set1_epi32(a)
#define CREATE_VECTOR_FROM_INPUT(input, offset) _mm256_set_epi32( \ #define CREATE_VECTOR_FROM_INPUT(input, offset) _mm256_set_epi32( \
input[offset + 0 * 8], \ input[offset + 7 * 8], \
input[offset + 1 * 8], \
input[offset + 2 * 8], \
input[offset + 3 * 8], \
input[offset + 4 * 8], \
input[offset + 5 * 8], \
input[offset + 6 * 8], \ input[offset + 6 * 8], \
input[offset + 7 * 8]) input[offset + 5 * 8], \
input[offset + 4 * 8], \
input[offset + 3 * 8], \
input[offset + 2 * 8], \
input[offset + 1 * 8], \
input[offset + 0 * 8])
#define WRITE_TO_OUTPUT(a, output) \ #define WRITE_TO_OUTPUT(a, output) \
((unsigned __int64*)output)[0] = a.m256i_u64[0]; \ ((unsigned __int64*)output)[0] = a.m256i_u64[0]; \

Loading…
Cancel
Save