Skip to content

Commit

Permalink
Fixed MSVC build error
Browse files Browse the repository at this point in the history
  • Loading branch information
sterrettm2 committed Sep 15, 2023
1 parent 527248c commit a051e6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xss-network-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ X86_SIMD_SORT_UNROLL_LOOP(64)
template <typename vtype, int numVecs, typename reg_t = typename vtype::reg_t>
X86_SIMD_SORT_INLINE void sort_n_vec(typename vtype::type_t *arr, int32_t N)
{
if (numVecs > 1 && N * 2 <= numVecs * vtype::numlanes) {
sort_n_vec<vtype, numVecs / 2>(arr, N);
return;
if constexpr (numVecs > 1) {
if (N * 2 <= numVecs * vtype::numlanes) {
sort_n_vec<vtype, numVecs / 2>(arr, N);
return;
}
}

reg_t vecs[numVecs];
Expand Down

0 comments on commit a051e6d

Please sign in to comment.