Skip to content
Permalink
Browse files

Fixes some casting issues in AVX-512 code.

  • Loading branch information...
cryptogenomicon committed Jun 5, 2017
1 parent a11ed10 commit 0ac2684bbd0f830dd207c74cb88b94ee99cbbed2
Showing with 3 additions and 3 deletions.
  1. +1 −1 esl_avx.h
  2. +2 −2 esl_avx512.h
@@ -155,7 +155,7 @@ static inline __m256
esl_avx_leftshiftz_float(__m256 v)
{
//permute result has vector[255:128] in low 128 bits, 0 in high 128
return ((__m256) _mm256_alignr_epi8(_mm256_permute2x128_si256((__m256i) v, (__m256i) v, 0x81), v, 4));
return ((__m256) _mm256_alignr_epi8(_mm256_permute2x128_si256((__m256i) v, (__m256i) v, 0x81), (__m256i) v, 4));
}


@@ -147,7 +147,7 @@ esl_avx512_rightshift_int16(__m512i v, __m512i neginfmask)
static inline __m512
esl_avx512_rightshiftz_float(__m512 v)
{
return ((__m512) _mm512_alignr_epi8((__m512i) v, _mm512_maskz_shuffle_i32x4(0xfff0, v, v, 0x90), 12));
return ((__m512) _mm512_alignr_epi8((__m512i) v, _mm512_maskz_shuffle_i32x4(0xfff0, (__m512i) v, (__m512i) v, 0x90), 12));
}

/* Function: esl_avx512_leftshiftz_float()
@@ -158,7 +158,7 @@ esl_avx512_rightshiftz_float(__m512 v)
static inline __m512
esl_avx512_leftshiftz_float(__m512 v)
{
return ((__m512) _mm512_alignr_epi8( _mm512_maskz_shuffle_i32x4(0x0fff, v, v, 0x39), v, 4));
return ((__m512) _mm512_alignr_epi8( _mm512_maskz_shuffle_i32x4(0x0fff, (__m512i) v, (__m512i) v, 0x39), (__m512i) v, 4));
}
#endif //eslAVX512_INCLUDED
#endif //eslENABLE_AVX512

0 comments on commit 0ac2684

Please sign in to comment.
You can’t perform that action at this time.