Skip to content

Commit 771d218

Browse files
authored
compiler opt flags from suyash (#394)
1 parent 219a5fd commit 771d218

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CMakeLists.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
8282
#
8383
# set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3
8484
# -DNDEBUG")
85-
set(CMAKE_C_FLAGS_RELEASE "-O3")
86-
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
85+
set(CMAKE_C_FLAGS_RELEASE "-O3 -march=native")
86+
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native")
8787

8888
#
8989
# Common dependencies for examples
@@ -182,6 +182,12 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
182182
# stl
183183
add_compile_options(-Wno-error=pass-failed)
184184
add_compile_options(-Wno-error=unknown-pragmas)
185+
186+
if(CMAKE_BUILD_TYPE STREQUAL "Release")
187+
add_compile_options(-qopenmp -qopt-streaming-stores=always
188+
-qopt-zmm-usage=high)
189+
add_link_options(-qopenmp)
190+
endif()
185191
endif()
186192

187193
if(ENABLE_SYCL)

0 commit comments

Comments
 (0)