summaryrefslogtreecommitdiff
path: root/boost/histogram/detail/linearize.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/histogram/detail/linearize.hpp')
-rw-r--r--boost/histogram/detail/linearize.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/boost/histogram/detail/linearize.hpp b/boost/histogram/detail/linearize.hpp
index fb3bea4f6a..bbee5a2a30 100644
--- a/boost/histogram/detail/linearize.hpp
+++ b/boost/histogram/detail/linearize.hpp
@@ -59,7 +59,12 @@ std::size_t linearize(Index& out, const std::size_t stride, const Axis& ax,
return linearize(opts, out, stride, ax.size(), axis::traits::index(ax, v));
}
-// initial offset of out must be zero
+/**
+ Must be used when axis is potentially growing. Also works for non-growing axis.
+
+ Initial offset of `out` must be zero. We cannot assert on this, because we do not
+ know if this is the first call of `linearize_growth`.
+*/
template <class Index, class Axis, class Value>
std::size_t linearize_growth(Index& out, axis::index_type& shift,
const std::size_t stride, Axis& a, const Value& v) {