From 5efab69386cf2449f2f2c7f4b6a8e5e67012a3aa Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 23 Jun 2023 18:06:29 +0200 Subject: [PATCH] Build kernel with vectorization --- src/heat/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/heat/CMakeLists.txt b/src/heat/CMakeLists.txt index a115a7b..7edf742 100644 --- a/src/heat/CMakeLists.txt +++ b/src/heat/CMakeLists.txt @@ -1,6 +1,12 @@ -add_library(heat_common STATIC common/misc.c common/kernel.c) +add_library(heat_kernel STATIC common/kernel.c) +target_include_directories(heat_kernel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_options(heat_kernel PRIVATE + -Rpass-analysis=loop-vectorize + -ffast-math) + +add_library(heat_common STATIC common/misc.c) target_include_directories(heat_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(heat_common PUBLIC m) +target_link_libraries(heat_common PUBLIC m heat_kernel) add_subdirectory(smp) add_subdirectory(mpi)