Skip to content

Commit d5ace97

Browse files
committed
Compile time SIMD determination
1 parent 38ed0a4 commit d5ace97

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -march=native")
2+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAG} -march=native -std=c++11 -O3")
33

44
add_executable( fmm_test
55
src/main.cpp

src/simd.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414

1515
const std::size_t simd_len = 8;
1616

17+
#ifdef __AVX__
18+
#pragma message( "Compiling with SIMD\n" )
1719
#define USE_SIMD
20+
#else
21+
#pragma message( "Compiling without SIMD\n" )
22+
#endif
1823

1924
#ifdef USE_SIMD
2025
#ifndef __MIC__

0 commit comments

Comments
 (0)