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

◆ linear_index() [2/3]

template<auto... S, std::integral... Index>
constexpr auto kwk::linear_index ( shape< S... >  sh,
Index...  idx 
)
constexprnoexcept

Computes a linear index from a order N list of 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