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
8 changes: 6 additions & 2 deletions benchmark/lookup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ function(gen_pp_benchmarks)
cib_lookup
mph
frozen-headers)
target_compile_options(${name} PRIVATE -fconstexpr-steps=4000000000
--include=${HEADER})
target_compile_options(
${name}
PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fconstexpr-steps=4000000000>
$<$<CXX_COMPILER_ID:GNU>:-fconstexpr-ops-limit=4000000000>
--include=${HEADER})
target_compile_definitions(
${name} PRIVATE ALG_NAME=bench_${ALG_NAME} DATASET=${DATASET}
ANKERL_NANOBENCH_IMPLEMENT)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/lookup/algorithms/pseudo_pext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ template <auto data, typename T, bool indirect = true,
std::size_t max_search_len = 2>
constexpr auto make_pseudo_pext() {
return lookup::pseudo_pext_lookup<indirect, max_search_len>::make(
CX_VALUE(lookup::input{0, pp::input_data<data, T>}));
CX_VALUE(lookup::input<T, T, data.size()>{0, pp::input_data<data, T>}));
}

template <auto data, typename T, bool indirect = true,
Expand Down
9 changes: 7 additions & 2 deletions benchmark/msg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
add_benchmark(handler_bench NANO FILES handler_bench.cpp SYSTEM_LIBRARIES cib)
target_compile_options(handler_bench PRIVATE -fconstexpr-steps=4000000000
-fbracket-depth=1024)
target_compile_options(
handler_bench
PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fconstexpr-steps=4000000000>
$<$<CXX_COMPILER_ID:GNU>:-fconstexpr-ops-limit=4000000000>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-fbracket-depth=1024>
)
2 changes: 2 additions & 0 deletions tools/benchmark/gen_map_data.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

import argparse
import random

Expand Down
32 changes: 27 additions & 5 deletions tools/benchmark/parse_bench_data.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python3

import argparse
import csv
import re

Expand Down Expand Up @@ -72,9 +75,28 @@ def generate_csv_tables(data, output_prefix):
writer.writerow(row)


# Usage example
file_path = 'bench_output2.txt'
output_prefix = 'output'
def parse_cmdline():
parser = argparse.ArgumentParser()
parser.add_argument(
"--input",
type=str,
required=True,
help=("Path to the input results."),
)
parser.add_argument(
"--output_prefix",
type=str,
required=True,
help="Output filename prefix for the generated CSV file.",
)
return parser.parse_args()


def main():
args = parse_cmdline()
data = parse_file(args.input)
generate_csv_tables(data, args.output_prefix)


data = parse_file(file_path)
generate_csv_tables(data, output_prefix)
if __name__ == "__main__":
main()
Empty file modified tools/gen_release_header.py
100644 → 100755
Empty file.
Loading