Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/avx512-16bit-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ struct zmm_vector<float16> {
}
static reg_t reverse(reg_t zmm)
{
const auto rev_index = _mm512_set_epi16(NETWORK_REVERSE_32LANES);
constexpr static uint16_t arr[] = {NETWORK_REVERSE_32LANES};
const auto rev_index = _mm512_loadu_si512(arr);
return permutexvar(rev_index, zmm);
}
static reg_t sort_vec(reg_t x)
Expand Down Expand Up @@ -320,7 +321,8 @@ struct zmm_vector<int16_t> {
}
static reg_t reverse(reg_t zmm)
{
const auto rev_index = _mm512_set_epi16(NETWORK_REVERSE_32LANES);
constexpr static uint16_t arr[] = {NETWORK_REVERSE_32LANES};
const auto rev_index = _mm512_loadu_si512(arr);
return permutexvar(rev_index, zmm);
}
static reg_t sort_vec(reg_t x)
Expand Down Expand Up @@ -462,7 +464,8 @@ struct zmm_vector<uint16_t> {
}
static reg_t reverse(reg_t zmm)
{
const auto rev_index = _mm512_set_epi16(NETWORK_REVERSE_32LANES);
constexpr static uint16_t arr[] = {NETWORK_REVERSE_32LANES};
const auto rev_index = _mm512_loadu_si512(arr);
return permutexvar(rev_index, zmm);
}
static reg_t sort_vec(reg_t x)
Expand Down
3 changes: 2 additions & 1 deletion src/avx512fp16-16bit-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ struct zmm_vector<_Float16> {
}
static reg_t reverse(reg_t zmm)
{
const auto rev_index = _mm512_set_epi16(NETWORK_REVERSE_32LANES);
constexpr static uint16_t arr[] = {NETWORK_REVERSE_32LANES};
const auto rev_index = _mm512_loadu_si512(arr);
return permutexvar(rev_index, zmm);
}
static reg_t sort_vec(reg_t x)
Expand Down
4 changes: 2 additions & 2 deletions src/xss-common-includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
#define NETWORK_REVERSE_16LANES \
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
#define NETWORK_REVERSE_32LANES \
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, \
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, \
13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0

#if defined(XSS_USE_OPENMP) && defined(_OPENMP)
#define XSS_COMPILE_OPENMP
Expand Down