Skip to content

Commit

Permalink
Port from x86 intrinsics to CPU native ones using SIMDe
Browse files Browse the repository at this point in the history
  • Loading branch information
pabs3 committed May 11, 2023
1 parent 81bf72f commit 7e7e5b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion AnnService/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ add_library (DistanceUtils STATIC
)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
target_compile_options(DistanceUtils PRIVATE -fPIC)
target_compile_options(DistanceUtils PRIVATE -fPIC -fopenmp-simd -O3)
target_compile_definitions(DistanceUtils PRIVATE SIMDE_ENABLE_NATIVE_ALIASES SIMDE_ENABLE_OPENMP)
endif()

add_library (SPTAGLib SHARED ${SRC_FILES} ${HDR_FILES})
Expand Down
7 changes: 5 additions & 2 deletions AnnService/inc/Core/Common/InstructionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

#ifndef _MSC_VER
#include <cpuid.h>
#include <xmmintrin.h>
#include <immintrin.h>
#include <simde/x86/sse.h>
#include <simde/x86/avx.h>
#include <simde/x86/avx2.h>
#include <simde/x86/avx512.h>
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS

void cpuid(int info[4], int InfoType);

Expand Down

0 comments on commit 7e7e5b2

Please sign in to comment.