Skip to content

Commit

Permalink
Enable architecture-specific optimization by default. Added option to…
Browse files Browse the repository at this point in the history
… turn it off.
  • Loading branch information
mikeoliphant committed Oct 24, 2023
1 parent 067b323 commit 97cff04
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ source_group(NAM ${CMAKE_CURRENT_SOURCE_DIR} FILES ${NAM_SOURCES})

option(DISABLE_DENORMALS "Disable floating point denormals" ON)

if(DISABLE_DENORMALS)
if (DISABLE_DENORMALS)
add_definitions(-DDISABLE_DENORMALS)
endif(DISABLE_DENORMALS)
endif (DISABLE_DENORMALS)

if (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)")
option(USE_NATIVE_ARCH "Enable architecture-specific optimizations" ON)

if (USE_NATIVE_ARCH)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64-v3")
message("Enabling -march=x86-64-v3")
endif (USE_NATIVE_ARCH)
endif ()

target_compile_features(neural_amp_modeler PUBLIC cxx_std_17)

Expand Down

0 comments on commit 97cff04

Please sign in to comment.