File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ add_library (DistanceUtils STATIC
3434 )
3535
3636if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" )
37- target_compile_options (DistanceUtils PRIVATE -mavx2 -mavx -msse -msse2 -mavx512f -mavx512bw -mavx512dq -fPIC )
37+ target_compile_options (DistanceUtils PRIVATE -fPIC -fopenmp-simd -O3 )
38+ target_compile_definitions (DistanceUtils PRIVATE SIMDE_ENABLE_NATIVE_ALIASES SIMDE_ENABLE_OPENMP )
3839endif ()
3940
4041add_library (SPTAGLib SHARED ${SRC_FILES} ${HDR_FILES} )
Original file line number Diff line number Diff line change 44#ifndef _SPTAG_COMMON_DISTANCEUTILS_H_
55#define _SPTAG_COMMON_DISTANCEUTILS_H_
66
7- #include < xmmintrin .h>
7+ #include < simde/x86/sse .h>
88#include < functional>
99#include < iostream>
1010
Original file line number Diff line number Diff line change 44#ifndef _SPTAG_COMMON_RNG_H_
55#define _SPTAG_COMMON_RNG_H_
66
7- #include < xmmintrin .h>
7+ #include < simde/x86/sse .h>
88#include " NeighborhoodGraph.h"
99
1010namespace SPTAG
Original file line number Diff line number Diff line change 44#ifndef _SPTAG_COMMON_SIMDUTILS_H_
55#define _SPTAG_COMMON_SIMDUTILS_H_
66
7- #include < xmmintrin .h>
7+ #include < simde/x86/sse .h>
88#include < functional>
99#include < iostream>
1010
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44#include " inc/Core/Common/DistanceUtils.h"
5- #include < immintrin.h>
5+ #include < simde/x86/avx.h>
6+ #include < simde/x86/avx2.h>
7+ #include < simde/x86/avx512.h>
8+
9+ #ifndef __mmask32
10+ #define __mmask32 simde__mmask32
11+ #endif
12+
13+ #ifndef __mmask64
14+ #define __mmask64 simde__mmask64
15+ #endif
16+
17+ #ifndef _mm512_setzero_ps
18+ #define _mm512_setzero_ps simde_mm512_setzero_ps
19+ #endif
620
721using namespace SPTAG ;
822using namespace SPTAG ::COMMON;
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44#include " inc/Core/Common/SIMDUtils.h"
5- #include < immintrin.h>
5+ #include < simde/x86/avx.h>
6+ #include < simde/x86/avx2.h>
7+ #include < simde/x86/avx512.h>
68
79using namespace SPTAG ;
810using namespace SPTAG ::COMMON;
You can’t perform that action at this time.
0 commit comments