Skip to content

Commit 1de5c3e

Browse files
committed
Forcefully disable Eigen vectorize if IPC_TOOLKIT_WITH_SIMD is ON
1 parent d30ad32 commit 1de5c3e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ if(IPC_TOOLKIT_WITH_SIMD)
266266
# Link against cross-platform xsimd library
267267
include(xsimd)
268268
target_link_libraries(ipc_toolkit PRIVATE xsimd::xsimd)
269+
270+
# Disable vectorization in Eigen since I've found it to have alignment issues.
271+
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_DONT_VECTORIZE=1)
269272
endif()
270273

271274
# For MSVC, do not use the min and max macros.

cmake/recipes/eigen.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ target_include_directories(Eigen3_Eigen SYSTEM INTERFACE
2626
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
2727
)
2828

29-
if(EIGEN_DONT_VECTORIZE OR IPC_TOOLKIT_WITH_SIMD)
30-
31-
# Disable vectorization in Eigen since I've found it to have alignment issues.
29+
if(EIGEN_DONT_VECTORIZE)
3230
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_DONT_VECTORIZE=1)
3331
endif()
3432

0 commit comments

Comments
 (0)