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 authored and dbussink committed Mar 14, 2024
1 parent b25ca47 commit 0a94b62
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 @@ -47,7 +47,8 @@ add_library (DistanceUtils STATIC
)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
target_compile_options(DistanceUtils PRIVATE -mavx2 -mavx -msse -msse2 -mavx512f -mavx512bw -mavx512dq -fPIC)
target_compile_options(DistanceUtils PRIVATE -fPIC -fopenmp-simd -O3)
target_compile_definitions(DistanceUtils PRIVATE SIMDE_ENABLE_NATIVE_ALIASES SIMDE_ENABLE_OPENMP)
endif()

find_package(TBB REQUIRED)
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 0a94b62

Please sign in to comment.