mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Fix AVX512 builds with MSVC.
(cherry picked from commit 9a14d91a9909cc430638ac750d323df10194b84e)
This commit is contained in:
parent
16844d7529
commit
973b04f3e1
@ -363,11 +363,19 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(EIGEN_TEST_FMA "Enable/Disable FMA/AVX2 in tests/examples" OFF)
|
option(EIGEN_TEST_FMA "Enable/Disable FMA/AVX2 in tests/examples" OFF)
|
||||||
if(EIGEN_TEST_FMA AND NOT EIGEN_TEST_NEON)
|
option(EIGEN_TEST_AVX2 "Enable/Disable FMA/AVX2 in tests/examples" OFF)
|
||||||
|
if((EIGEN_TEST_FMA AND NOT EIGEN_TEST_NEON) OR EIGEN_TEST_AVX2)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
|
||||||
message(STATUS "Enabling FMA/AVX2 in tests/examples")
|
message(STATUS "Enabling FMA/AVX2 in tests/examples")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
|
||||||
|
option(EIGEN_TEST_AVX512DQ "Enable/Disable AVX512DQ in tests/examples" OFF)
|
||||||
|
if(EIGEN_TEST_AVX512 OR EIGEN_TEST_AVX512DQ)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX512")
|
||||||
|
message(STATUS "Enabling AVX512 in tests/examples")
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
|
option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
|
||||||
|
@ -693,7 +693,7 @@ EIGEN_STRONG_INLINE Packet8d pload<Packet8d>(const double* from) {
|
|||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet16i pload<Packet16i>(const int* from) {
|
EIGEN_STRONG_INLINE Packet16i pload<Packet16i>(const int* from) {
|
||||||
EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
|
EIGEN_DEBUG_ALIGNED_LOAD return _mm512_load_si512(
|
||||||
reinterpret_cast<const __m512i*>(from));
|
reinterpret_cast<const __m512i*>(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user