Kiwaku 0.1-beta
Containers Well Made
 
Loading...
Searching...
No Matches

◆ linear_index() [3/3]

template<auto... S, kumi::sized_product_type< shape< S... >::static_order > Indexes>
constexpr auto kwk::linear_index ( shape< S... >  sh,
Indexes  idx 
)
constexprnoexcept

Computes a linear index from a tuple of N indexes.

Parameters
shShape used as a reference
idxIndividual list of indexes representing the order N index to linearize
Returns
The linear index equivalent to (idx...) for the current shape