From e55f7fbe4cf70fd6f71dd4a4a1fb5083ef58f065 Mon Sep 17 00:00:00 2001 From: Matthew Sterrett Date: Wed, 31 Jan 2024 10:57:09 -0800 Subject: [PATCH] Moved declaration of comparison_func to fix build issues --- src/xss-common-includes.h | 3 +++ src/xss-common-qsort.h | 2 +- src/xss-pivot-selection.hpp | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xss-common-includes.h b/src/xss-common-includes.h index 98a3fe15..281bcc01 100644 --- a/src/xss-common-includes.h +++ b/src/xss-common-includes.h @@ -106,4 +106,7 @@ struct avx2_half_vector; enum class simd_type : int { AVX2, AVX512 }; +template +X86_SIMD_SORT_INLINE bool comparison_func(const T &a, const T &b); + #endif // XSS_COMMON_INCLUDES diff --git a/src/xss-common-qsort.h b/src/xss-common-qsort.h index 47267b82..f95fab79 100644 --- a/src/xss-common-qsort.h +++ b/src/xss-common-qsort.h @@ -136,7 +136,7 @@ X86_SIMD_SORT_INLINE arrsize_t move_nans_to_end_of_array(T *arr, arrsize_t size) return size - count - 1; } -template +template X86_SIMD_SORT_INLINE bool comparison_func(const T &a, const T &b) { return a < b; diff --git a/src/xss-pivot-selection.hpp b/src/xss-pivot-selection.hpp index bd793e60..2a1c3bd5 100644 --- a/src/xss-pivot-selection.hpp +++ b/src/xss-pivot-selection.hpp @@ -37,9 +37,6 @@ type_t next_value(type_t value){ template X86_SIMD_SORT_INLINE void COEX(mm_t &a, mm_t &b); -template -X86_SIMD_SORT_INLINE bool comparison_func(const T &a, const T &b); - template X86_SIMD_SORT_INLINE type_t get_pivot(type_t *arr, const arrsize_t left,