@@ -72,9 +72,8 @@ void tied_copy_sweep_grid_shape(nvbench::state &state)
7272}
7373NVBENCH_BENCH (tied_copy_sweep_grid_shape)
7474 // Every power of two from 64->1024:
75- .add_int64_axis(" BlockSize" , {32 ,64 ,128 ,256 })
76- .add_int64_axis(" NumBlocks" , {1024 ,512 ,256 ,128 })
77- .zip_axes({" BlockSize" , " NumBlocks" });
75+ .add_zip_axes(nvbench::int64_axis{" BlockSize" , {32 , 64 , 128 , 256 }},
76+ nvbench::int64_axis{" NumBlocks" , {1024 , 512 , 256 , 128 }});
7877
7978// ==============================================================================
8079// under_diag:
@@ -89,7 +88,8 @@ struct under_diag final : nvbench::user_axis_space
8988{
9089 under_diag (std::vector<std::size_t > input_indices,
9190 std::vector<std::size_t > output_indices)
92- : nvbench::user_axis_space(std::move(input_indices), std::move(output_indices))
91+ : nvbench::user_axis_space(std::move(input_indices),
92+ std::move (output_indices))
9393 {}
9494
9595 mutable std::size_t x_pos = 0 ;
@@ -154,15 +154,12 @@ void user_copy_sweep_grid_shape(nvbench::state &state)
154154 copy_sweep_grid_shape (state);
155155}
156156NVBENCH_BENCH (user_copy_sweep_grid_shape)
157- // Every power of two from 64->1024:
158- .add_int64_power_of_two_axis(" BlockSize" , nvbench::range(6 , 10 ))
159- .add_int64_power_of_two_axis(" NumBlocks" , nvbench::range(6 , 10 ))
160- .user_iteration_axes({" NumBlocks" , " BlockSize" },
161- [](auto ... args)
162- -> std::unique_ptr<nvbench::axis_space_base> {
163- return std::make_unique<under_diag>(args...);
164- });
165-
157+ .add_user_iteration_axes(
158+ [](auto ... args) -> std::unique_ptr<nvbench::axis_space_base> {
159+ return std::make_unique<under_diag>(args...);
160+ },
161+ nvbench::int64_axis (" BlockSize" , {64 , 128 , 256 , 512 , 1024 }),
162+ nvbench::int64_axis(" NumBlocks" , {1024 , 521 , 256 , 128 , 64 }));
166163
167164// ==============================================================================
168165// gauss:
@@ -174,7 +171,8 @@ struct gauss final : nvbench::user_axis_space
174171
175172 gauss (std::vector<std::size_t > input_indices,
176173 std::vector<std::size_t > output_indices)
177- : nvbench::user_axis_space(std::move(input_indices), std::move(output_indices))
174+ : nvbench::user_axis_space(std::move(input_indices),
175+ std::move (output_indices))
178176 {}
179177
180178 nvbench::detail::axis_space_iterator do_iter (axes_info info) const
@@ -233,15 +231,13 @@ void dual_float64_axis(nvbench::state &state)
233231 });
234232}
235233NVBENCH_BENCH (dual_float64_axis)
236- .add_float64_axis(" Duration_A" , nvbench::range(0 ., 1e-4 , 1e-5 ))
237- .add_float64_axis(" Duration_B" , nvbench::range(0 ., 1e-4 , 1e-5 ))
238- .user_iteration_axes({" Duration_A" },
239- [](auto ... args)
240- -> std::unique_ptr<nvbench::axis_space_base> {
241- return std::make_unique<gauss>(args...);
242- })
243- .user_iteration_axes({" Duration_B" },
244- [](auto ... args)
245- -> std::unique_ptr<nvbench::axis_space_base> {
246- return std::make_unique<gauss>(args...);
247- });
234+ .add_user_iteration_axes(
235+ [](auto ... args) -> std::unique_ptr<nvbench::axis_space_base> {
236+ return std::make_unique<gauss>(args...);
237+ },
238+ nvbench::float64_axis (" Duration_A" , nvbench::range(0 ., 1e-4 , 1e-5 )))
239+ .add_user_iteration_axes(
240+ [](auto ... args) -> std::unique_ptr<nvbench::axis_space_base> {
241+ return std::make_unique<gauss>(args...);
242+ },
243+ nvbench::float64_axis (" Duration_B" , nvbench::range(0 ., 1e-4 , 1e-5 )));
0 commit comments