Skip to content

Commit

Permalink
Merge pull request #49 from bkille/improve-shift
Browse files Browse the repository at this point in the history
Improve shift and benchmarking
  • Loading branch information
bkille authored Jun 6, 2024
2 parents 70eb1d4 + 007d772 commit bdc9339
Show file tree
Hide file tree
Showing 37 changed files with 1,840 additions and 426 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "benchmark/ext/BitArray"]
path = benchmark/ext/BitArray
url = https://github.com/noporpoise/BitArray.git
[submodule "benchmark/ext/itsy_bitsy"]
path = benchmark/ext/itsy_bitsy
url = https://github.com/ThePhD/itsy_bitsy.git
[submodule "benchmark/ext/dynamic_bitset"]
path = benchmark/ext/dynamic_bitset
url = https://github.com/pinam45/dynamic_bitset.git
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.14)

# set the project name
project(Bit-Vector VERSION 0.1.1)
project(Bit-Vector VERSION 0.3.0)

# set output directory of builds
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down Expand Up @@ -46,6 +46,7 @@ option(BITLIB_HWY "Build with google highway SIMD extensions" OFF)
option(BITLIB_BENCHMARK "Build bitlib benchmarks" OFF)
option(BITLIB_EXAMPLE "Build bitlib examples" OFF)
option(BITLIB_TEST "Build bitlib tests" OFF)
option(BITLIB_PROFILE "Buid simple example for profiling" OFF)
option(BITLIB_COVERAGE "Compute test coverage" OFF)

if (BITLIB_HWY)
Expand All @@ -64,3 +65,7 @@ if(BITLIB_TEST)
add_subdirectory(test)
endif()

if(BITLIB_PROFILE)
add_subdirectory(profile)
endif()

184 changes: 109 additions & 75 deletions README.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ set(CMAKE_BUILD_TYPE Release)
file(GLOB BENCH_SOURCES "src/*.cc")
add_executable(bitlib-bench ${BENCH_SOURCES})

add_subdirectory(ext/dynamic_bitset)

# specify benchmark-specific libraries
include_directories(${googlebench_SOURCE_DIR}/benchmark/include src/utils)
target_link_libraries(bitlib-bench PRIVATE benchmark::benchmark -pthread)
include_directories(
${googlebench_SOURCE_DIR}/benchmark/include
src/utils
ext/BitArray
ext/itsy_bitsy/include)
target_link_libraries(bitlib-bench PRIVATE benchmark::benchmark -pthread ${CMAKE_CURRENT_LIST_DIR}/ext/BitArray/libbitarr.a sul::dynamic_bitset)

target_compile_options(bitlib-bench PUBLIC -O3 -DNDEBUG -march=native -Wpedantic)
install(TARGETS bitlib-bench DESTINATION .)
Loading

0 comments on commit bdc9339

Please sign in to comment.