Skip to content

Commit

Permalink
fix msvc compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Dec 12, 2024
1 parent 978504e commit e44898a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions halftime-hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace advanced {

namespace {

#if __AVX512F__
#ifdef __AVX512F__

using u512 = __m512i;

Expand All @@ -43,7 +43,7 @@ struct BlockWrapper512 {

#endif

#if __AVX2__
#ifdef __AVX2__

using u256 = __m256i;

Expand Down Expand Up @@ -120,7 +120,7 @@ struct BlockWrapper128 {

#endif

#if __SSE2__
#ifdef __SSE2__

using u128 = __m128i;

Expand Down Expand Up @@ -929,7 +929,7 @@ inline uint64_t TabulateAfter(const uint64_t* entropy, const char* char_input,
return result;
}

#if __AVX512F__
#ifdef __AVX512F__

template <unsigned dimension, unsigned in_width, unsigned encoded_dimension,
unsigned out_width>
Expand All @@ -941,7 +941,7 @@ inline void V4Avx512(const uint64_t* entropy, const char* char_input, size_t len

#endif

#if __AVX2__
#ifdef __AVX2__

template <unsigned dimension, unsigned in_width, unsigned encoded_dimension,
unsigned out_width>
Expand All @@ -961,7 +961,7 @@ inline void V4Avx2(const uint64_t* entropy, const char* char_input, size_t lengt

#endif

#if __SSE2__
#ifdef __SSE2__

template <unsigned dimension, unsigned in_width, unsigned encoded_dimension,
unsigned out_width>
Expand Down Expand Up @@ -1076,21 +1076,21 @@ inline void V1(const uint64_t* entropy, const char* char_input, size_t length,
SPECIALIZE(version, isa, 3, 7, 3, 9) \
SPECIALIZE(version, isa, 2, 6, 3, 7)

#if __AVX512F__
#ifdef __AVX512F__

SPECIALIZE_4(4, Avx512)
SPECIALIZE_4(3, Avx2)
SPECIALIZE_4(2, Sse2)
SPECIALIZE_4(1, Scalar)

#elif __AVX2__
#elif defined __AVX2__

SPECIALIZE_4(4, Avx2)
SPECIALIZE_4(3, Avx2)
SPECIALIZE_4(2, Sse2)
SPECIALIZE_4(1, Scalar)

#elif __SSE2__
#elif defined __SSE2__

SPECIALIZE_4(4, Sse2)
SPECIALIZE_4(3, Sse2)
Expand Down

0 comments on commit e44898a

Please sign in to comment.