File tree Expand file tree Collapse file tree 5 files changed +13
-20
lines changed
include/proxsuite/linalg/dense Expand file tree Collapse file tree 5 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -109,17 +109,6 @@ set(EXPORTED_TARGETS_LIST proxsuite)
109109
110110add_header_group(${PROJECT_NAME} _HEADERS)
111111
112- add_library (proxsuite-not -vectorized INTERFACE )
113- target_link_libraries (
114- proxsuite-not -vectorized
115- PUBLIC
116- INTERFACE proxsuite)
117- target_compile_definitions (
118- proxsuite-not -vectorized
119- PUBLIC
120- INTERFACE PROXSUITE_DONT_VECTORIZE)
121- list (APPEND EXPORTED_TARGETS_LIST proxsuite-not -vectorized)
122-
123112if (BUILD_WITH_VECTORIZATION_SUPPORT)
124113 add_library (proxsuite-vectorized INTERFACE )
125114 target_link_libraries (
@@ -130,6 +119,10 @@ if(BUILD_WITH_VECTORIZATION_SUPPORT)
130119 proxsuite-vectorized
131120 PUBLIC
132121 INTERFACE simde)
122+ target_compile_definitions (
123+ proxsuite-vectorized
124+ PUBLIC
125+ INTERFACE PROXSUITE_VECTORIZE)
133126 list (APPEND EXPORTED_TARGETS_LIST proxsuite-vectorized)
134127endif ()
135128
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ function(CREATE_PYTHON_TARGET target_name COMPILE_OPTIONS dependencies)
6161 install (TARGETS ${target_name} DESTINATION ${${PYWRAP} _INSTALL_DIR})
6262endfunction ()
6363
64- create_python_target(proxsuite_pywrap "" proxsuite- not -vectorized )
64+ create_python_target(proxsuite_pywrap "" proxsuite)
6565if (BUILD_WITH_VECTORIZATION_SUPPORT)
6666 if (BUILD_BINDINGS_WITH_AVX2_SUPPORT)
6767 create_python_target(proxsuite_pywrap_avx2 "-mavx2;-mfma"
Original file line number Diff line number Diff line change 1111
1212#include < immintrin.h>
1313
14- #ifndef PROXSUITE_DONT_VECTORIZE
14+ #ifdef PROXSUITE_VECTORIZE
1515#include < cmath> // to avoid error of the type no member named 'isnan' in namespace 'std';
1616#include < simde/x86/avx2.h>
1717#include < simde/x86/fma.h>
@@ -161,7 +161,7 @@ struct Pack<T, 1>
161161 }
162162};
163163
164- #ifndef PROXSUITE_DONT_VECTORIZE
164+ #ifdef PROXSUITE_VECTORIZE
165165template <>
166166struct Pack <f32 , 4 >
167167{
@@ -272,7 +272,7 @@ struct NativePackInfo
272272 using Type = Pack<f32 , N>;
273273};
274274
275- #ifndef PROXSUITE_DONT_VECTORIZE
275+ #ifdef PROXSUITE_VECTORIZE
276276template <>
277277struct NativePackInfo <f32 >
278278{
@@ -308,7 +308,7 @@ round_up(T a, T b) noexcept -> T
308308 return a + (b - 1 ) / b * b;
309309}
310310
311- #ifndef PROXSUITE_DONT_VECTORIZE
311+ #ifdef PROXSUITE_VECTORIZE
312312template <typename T>
313313using should_vectorize =
314314 proxsuite::linalg::veg::meta::bool_constant<VEG_CONCEPT(same<T, f32 >) ||
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ template<>
3232struct proxsuite ::linalg::veg::mem::Alloc<
3333 proxsuite::linalg::dense::_detail::SimdAlignedSystemAlloc>
3434{
35- #ifdef PROXSUITE_DONT_VECTORIZE
36- static constexpr usize min_align = 0 ;
37- #else
35+ #ifdef PROXSUITE_VECTORIZE
3836 static constexpr usize min_align = alignof (std::max_align_t ) >
3937 SIMDE_NATURAL_VECTOR_SIZE / 8
4038 ? SIMDE_NATURAL_VECTOR_SIZE / 8
4139 : alignof (std::max_align_t );
40+ #else
41+ static constexpr usize min_align = 0 ;
4242#endif
4343
4444 using RefMut = proxsuite::linalg::veg::RefMut<
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ target_include_directories(proxsuite-test-util PUBLIC ./include)
1616if (BUILD_WITH_VECTORIZATION_SUPPORT)
1717 target_link_libraries (proxsuite-test -util proxsuite-vectorized matio)
1818else ()
19- target_link_libraries (proxsuite-test -util proxsuite- not -vectorized matio)
19+ target_link_libraries (proxsuite-test -util proxsuite matio)
2020endif ()
2121
2222macro (proxsuite_test name path )
You can’t perform that action at this time.
0 commit comments