Compile mixed precision code only if AVX2 is supported.

For this we remove the GCC pragmas and set the needed compiler flag
when available.
This commit is contained in:
Markus Blatt committed 2025-11-27 13:40:07 +01:00
1 parent f34f3beb6d
commit 40e8839171
4 files changed
+1 -16

No files matched your search

-5
View File
@@ -756,11 +756,6 @@ if(HAVE_AVX2_EXTENSION)
endif()
# must link libraries after target 'opmsimulators' has been defined
if(HAVE_AVX2_EXTENSIONS)
target_compile_options(opmsimulators
${AVX2_FLAGS})
endif()
if(CUDA_FOUND)
if (NOT USE_HIP)
target_link_libraries(opmsimulators
+1 -3
View File
@@ -6,8 +6,6 @@
#include <stdlib.h>
#include <assert.h>
#pragma GCC push_options
#pragma GCC target("avx2")
bslv_memory *bslv_alloc()
{
@@ -239,7 +237,7 @@ int bslv_pbicgstab3d(bslv_memory *mem, bsr_matrix *A, const double *b, double *x
}
#pragma GCC pop_options
-4
View File
@@ -7,8 +7,6 @@
#include <immintrin.h>
#pragma GCC push_options
#pragma GCC target("avx2")
bsr_matrix* bsr_alloc()
{
@@ -206,5 +204,3 @@ void bsr_nonzeros(bsr_matrix *A, const char *name)
printf("]\n");
}
#pragma GCC pop_options
-4
View File
@@ -4,9 +4,6 @@
#include <assert.h>
#include <immintrin.h>
#pragma GCC push_options
#pragma GCC target("avx2")
prec_t *prec_alloc()
{
@@ -628,4 +625,3 @@ void prec_info(prec_t *P)
bsr_info(P->D);
bsr_info(P->U);
}
#pragma GCC pop_options