Quality of Life helpers.
More...
|
| template<std::integral Idx, auto... Desc> |
| constexpr auto | kwk::coordinates (Idx idx, shape< Desc... > const shp) noexcept |
| | Computes a tuple of coordinates from a linear index and a shape.
|
| |
template<auto... S, kwk::concepts::range Indexes>
requires ( !kumi::sized_product_type<Indexes,shape<S...>::static_order> ) |
| constexpr auto | kwk::linear_index (shape< S... > const &sh, Indexes const &indexes) noexcept |
| | Computes a linear index from a range of N indexes.
|
| |
| template<auto... S, std::integral... Index> |
| constexpr auto | kwk::linear_index (shape< S... > sh, Index... idx) noexcept |
| | Computes a linear index from a order N list of indexes.
|
| |
| template<auto... S, kumi::sized_product_type< shape< S... >::static_order > Indexes> |
| constexpr auto | kwk::linear_index (shape< S... > sh, Indexes idx) noexcept |
| | Computes a linear index from a tuple of N indexes.
|
| |
| template<char... c> |
| constexpr auto | kwk::operator""_c () noexcept |
| | User-defined literal suffix for compile-time constant.
|
| |
|
| constexpr joker | kwk::_ = {} |
| | Joker value.
|
| |
|
template<auto N> |
| constexpr auto | kwk::fixed = constant<N>{} |
| | Provides a short-cut to define a std::integral_constant value from a literal integer.
|
| |