Skip to content

Commit

Permalink
Fix sign conversion in ws_insert
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl authored and ripatel-fd committed Dec 6, 2024
1 parent 01fc793 commit 6950ff2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util/simd/fd_avx_wh.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static inline void wh_stu( void * p, wh_t i ) { _mm256_storeu_si256( (__m256i *)
Note: C99 TC3 allows type punning through a union. */

#define wh_extract(a,imm) ((ushort)_mm256_extract_epi16( (a), (imm) ))
#define wh_insert(a,imm,v) _mm256_insert_epi16( (a), (int)(v), (imm) )
#define wh_insert(a,imm,v) _mm256_insert_epi16( (a), (short)(v), (imm) )

static inline ushort
wh_extract_variable( wh_t a, int n ) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/simd/fd_avx_ws.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static inline void ws_stu( void * p, ws_t i ) { _mm256_storeu_si256( (__m256i *)
Note: C99 TC3 allows type punning through a union. */

#define ws_extract(a,imm) ((short)_mm256_extract_epi16( (a), (imm) ))
#define ws_insert(a,imm,v) _mm256_insert_epi16( (a), (int)(v), (imm) )
#define ws_insert(a,imm,v) _mm256_insert_epi16( (a), (v), (imm) )

static inline short
ws_extract_variable( ws_t a, int n ) {
Expand Down

0 comments on commit 6950ff2

Please sign in to comment.