Skip to content

Commit 3936221

Browse files
committed
Fixed MSVC build error
1 parent 973dd8a commit 3936221

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/xss-network-qsort.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ X86_SIMD_SORT_UNROLL_LOOP(64)
7272
template <typename vtype, int numVecs, typename reg_t = typename vtype::reg_t>
7373
X86_SIMD_SORT_INLINE void sort_n_vec(typename vtype::type_t *arr, int32_t N)
7474
{
75-
if (numVecs > 1 && N * 2 <= numVecs * vtype::numlanes) {
76-
sort_n_vec<vtype, numVecs / 2>(arr, N);
77-
return;
75+
if constexpr (numVecs > 1) {
76+
if (N * 2 <= numVecs * vtype::numlanes) {
77+
sort_n_vec<vtype, numVecs / 2>(arr, N);
78+
return;
79+
}
7880
}
7981

8082
reg_t vecs[numVecs];

0 commit comments

Comments
 (0)