Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[benchmark] split benchmark cmake for ease #364

Merged
merged 1 commit into from
Jul 5, 2023
Merged
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
53 changes: 29 additions & 24 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,6 @@ endforeach()

foreach(BACKEND IN ITEMS "eigen")
foreach(STATE_SIZE RANGE 1 2)
foreach(OUTPUT_SIZE RANGE 1 2)
configure_file(update_linalg_xx0.cpp
update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.cpp)
add_executable(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.cpp)
target_include_directories(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE "include")
set_target_properties(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PROPERTIES CXX_STANDARD 23)
set_target_properties(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PROPERTIES CXX_EXTENSIONS OFF)
target_link_libraries(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
kalman_linalg_${BACKEND})
add_test(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
"--benchmark_out=update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.json")
endforeach()
foreach(INPUT_SIZE RANGE 1 2)
configure_file(predict_linalg_x1x.cpp
predict_${BACKEND}_${STATE_SIZE}x1x${INPUT_SIZE}.cpp)
Expand All @@ -122,3 +98,32 @@ foreach(BACKEND IN ITEMS "eigen")
endforeach()
endforeach()
endforeach()

foreach(BACKEND IN ITEMS "eigen")
foreach(STATE_SIZE RANGE 1 2)
foreach(OUTPUT_SIZE RANGE 1 2)
configure_file(update_linalg_xx0.cpp
update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.cpp)
add_executable(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.cpp)
target_include_directories(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE "include")
set_target_properties(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PROPERTIES CXX_STANDARD 23)
set_target_properties(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PROPERTIES CXX_EXTENSIONS OFF)
target_link_libraries(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
PRIVATE benchmark::benchmark benchmark::benchmark_main kalman
kalman_linalg_${BACKEND})
add_test(
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0
kalman_benchmark_update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0_driver
"--benchmark_out=update_${BACKEND}_${STATE_SIZE}x${OUTPUT_SIZE}x0.json")
endforeach()
endforeach()
endforeach()