Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.12)
project(pixie)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(MARCH "native" CACHE STRING "march compilier flag")
set(CMAKE_CXX_FLAGS "-march=${MARCH}")
Expand Down Expand Up @@ -35,16 +38,25 @@ FetchContent_Declare(
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable Google Benchmark tests")
FetchContent_MakeAvailable(googlebenchmark)

FetchContent_Declare(
pasta_bit_vector
GIT_REPOSITORY https://github.com/pasta-toolbox/bit_vector.git
GIT_TAG origin/main
)
FetchContent_MakeAvailable(pasta_bit_vector)

# add_subdirectory(third_party/pasta_bv)

add_executable(benchmarks
src/benchmarks.cpp)
target_include_directories(benchmarks
PUBLIC include
)
set_property(TARGET benchmarks PROPERTY CXX_STANDARD 20)

target_link_libraries(benchmarks
benchmark
benchmark_main)
benchmark_main
pasta_bit_vector)
add_test(
NAME Benchmarks
COMMAND bt_benchmarks --benchmark_out=bm_report.csv --benchmark_out_format=csv
Expand All @@ -56,7 +68,6 @@ target_include_directories(unittests
PUBLIC include
PUBLIC ${GOOGLETEST_SOURCE_DIR}/include
)
set_property(TARGET unittests PROPERTY CXX_STANDARD 20)
target_link_libraries(unittests
gtest
gtest_main)
Expand All @@ -77,7 +88,6 @@ add_executable(bench_rmm
target_include_directories(bench_rmm
PUBLIC include
)
set_property(TARGET bench_rmm PROPERTY CXX_STANDARD 20)
target_link_libraries(bench_rmm
benchmark)

Expand All @@ -87,7 +97,6 @@ target_include_directories(test_rmm
PUBLIC include
PUBLIC include/misc
)
set_property(TARGET test_rmm PROPERTY CXX_STANDARD 20)
target_link_libraries(test_rmm
gtest
gtest_main)
Expand Down
6 changes: 5 additions & 1 deletion src/benchmarks.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include <benchmark/benchmark.h>
#include <bitvector.h>

#ifdef PIXIE_THIRD_PARTY_BENCHMARKS
// TODO: change the pasta/bit_vector usage of std::aligned_alloc
#include <pasta/bit_vector/bit_vector.hpp>
#endif
#include <cstdlib>
#include <random>
#include <vector>

Expand Down