"vscode:/vscode.git/clone" did not exist on "2d1da45c8417f410e98641fd38eb51cff835d125"
Commit f0d27006 authored by Paul's avatar Paul
Browse files

Formatting

parent 2c10f815
...@@ -96,21 +96,21 @@ struct raw_data ...@@ -96,21 +96,21 @@ struct raw_data
} }
}; };
namespace detail { namespace detail {
template<class V, class... Ts> template <class V, class... Ts>
void visit_all_impl(const shape& s, V&& v, Ts&&... xs) void visit_all_impl(const shape& s, V&& v, Ts&&... xs)
{ {
s.visit_type([&](auto as) { s.visit_type([&](auto as) { v(make_view(xs.get_shape(), as.from(xs.data()))...); });
v(make_view(xs.get_shape(), as.from(xs.data()))...);
});
}
} }
} // namespace detail
/** /**
* @brief Visits every object together * @brief Visits every object together
* @details This will visit every object, but assumes each object is the same type. This can reduce the deeply nested visit calls. This will return a function that will take the visitor callback. So it will be called with `visit_all(xs...)([](auto... ys) {})` where `xs...` and `ys...` are the same number of parameters. * @details This will visit every object, but assumes each object is the same type. This can reduce
* * the deeply nested visit calls. This will return a function that will take the visitor callback.
* So it will be called with `visit_all(xs...)([](auto... ys) {})` where `xs...` and `ys...` are the
* same number of parameters.
*
* @param x A raw data object * @param x A raw data object
* @param xs Many raw data objects * @param xs Many raw data objects
* @return A function to be called with the visitor * @return A function to be called with the visitor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment