Skip to content

Commit 9b96bf2

Browse files
committed
Adding a bandwidth test
1 parent cd0454d commit 9b96bf2

File tree

2 files changed

+607
-0
lines changed

2 files changed

+607
-0
lines changed

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ CPMAddPackage(
2828
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
2929
)
3030

31+
CPMAddPackage(
32+
NAME xsimd
33+
GITHUB_REPOSITORY xtensor-stack/xsimd
34+
GIT_TAG 13.2.0
35+
)
36+
37+
find_package(OpenMP REQUIRED)
38+
3139
include_directories(include)
3240

3341
add_executable(latency-test latency.cpp)
@@ -36,3 +44,8 @@ target_compile_features(latency-test PRIVATE cxx_std_17) # This means at least C
3644

3745
add_executable(branch-test branch.cpp)
3846
target_compile_features(branch-test PRIVATE cxx_std_17) # This means at least C++17
47+
48+
add_executable(memory-bandwidth bandwidth.cpp)
49+
target_link_libraries(memory-bandwidth PRIVATE xsimd OpenMP::OpenMP_CXX)
50+
target_compile_features(memory-bandwidth PRIVATE cxx_std_17)
51+
target_compile_options(memory-bandwidth PRIVATE -march=native)

0 commit comments

Comments
 (0)