@@ -41,8 +41,8 @@ namespace nvbench
4141// Holds dynamic axes information.
4242struct axes_metadata
4343{
44- using axes_type = std::vector<std::unique_ptr<nvbench::axis_base>>;
45- using iteration_space_type = std::vector<std::unique_ptr<nvbench::iteration_space_base>>;
44+ using axes_type = std::vector<std::unique_ptr<nvbench::axis_base>>;
45+ using iteration_spaces_type = std::vector<std::unique_ptr<nvbench::iteration_space_base>>;
4646
4747 template <typename ... TypeAxes>
4848 explicit axes_metadata (nvbench::type_list<TypeAxes...>);
@@ -71,7 +71,6 @@ struct axes_metadata
7171 {
7272 const std::size_t start = this ->m_axes .size ();
7373 const std::size_t count = sizeof ...(Args);
74- // (this->add_axis(std::forward<Args>(args)), ...);
7574 (m_axes.push_back (args.clone ()), ...);
7675 this ->add_zip_space (start, count);
7776 }
@@ -86,13 +85,13 @@ struct axes_metadata
8685 this ->add_user_iteration_space (std::move (make), start, count);
8786 }
8887
89- [[nodiscard]] const iteration_space_type & get_type_iteration_space () const
88+ [[nodiscard]] const iteration_spaces_type & get_type_iteration_spaces () const
9089 {
91- return m_type_space ;
90+ return m_type_iteration_spaces ;
9291 }
93- [[nodiscard]] const iteration_space_type & get_value_iteration_space () const
92+ [[nodiscard]] const iteration_spaces_type & get_value_iteration_spaces () const
9493 {
95- return m_value_space ;
94+ return m_value_iteration_spaces ;
9695 }
9796
9897 [[nodiscard]] const nvbench::int64_axis &get_int64_axis (std::string_view name) const ;
@@ -126,8 +125,8 @@ struct axes_metadata
126125private:
127126 axes_type m_axes;
128127 std::size_t m_type_axe_count = 0 ;
129- iteration_space_type m_type_space ;
130- iteration_space_type m_value_space ;
128+ iteration_spaces_type m_type_iteration_spaces ;
129+ iteration_spaces_type m_value_iteration_spaces ;
131130
132131 void add_zip_space (std::size_t first_index, std::size_t count);
133132 void add_user_iteration_space (std::function<nvbench::make_user_space_signature> make,
@@ -144,22 +143,23 @@ axes_metadata::axes_metadata(nvbench::type_list<TypeAxes...>)
144143 auto names = axes_metadata::generate_default_type_axis_names (num_type_axes);
145144
146145 auto names_iter = names.begin (); // contents will be moved from
147- nvbench::tl::foreach<type_axes_list>(
148- [&axes = m_axes, &spaces = m_type_space, &names_iter]([[maybe_unused]] auto wrapped_type) {
149- // This is always called before other axes are added, so the length of the
150- // axes vector will be the type axis index:
151- const std::size_t type_axis_index = axes.size ();
152-
153- spaces.push_back (std::make_unique<linear_axis_space>(type_axis_index));
154-
155- // Note:
156- // The word "type" appears 6 times in the next line.
157- // Every. Single. Token.
158- typedef typename decltype (wrapped_type)::type type_list;
159- auto axis = std::make_unique<nvbench::type_axis>(std::move (*names_iter++), type_axis_index);
160- axis->template set_inputs <type_list>();
161- axes.push_back (std::move (axis));
162- });
146+ nvbench::tl::foreach<type_axes_list>([&axes = m_axes,
147+ &spaces = m_type_iteration_spaces,
148+ &names_iter]([[maybe_unused]] auto wrapped_type) {
149+ // This is always called before other axes are added, so the length of the
150+ // axes vector will be the type axis index:
151+ const std::size_t type_axis_index = axes.size ();
152+
153+ spaces.push_back (std::make_unique<linear_axis_space>(type_axis_index));
154+
155+ // Note:
156+ // The word "type" appears 6 times in the next line.
157+ // Every. Single. Token.
158+ typedef typename decltype (wrapped_type)::type type_list;
159+ auto axis = std::make_unique<nvbench::type_axis>(std::move (*names_iter++), type_axis_index);
160+ axis->template set_inputs <type_list>();
161+ axes.push_back (std::move (axis));
162+ });
163163 m_type_axe_count = m_axes.size ();
164164}
165165
0 commit comments