16 #ifndef OPENKALMAN_MAX_TENSOR_ORDER_HPP 17 #define OPENKALMAN_MAX_TENSOR_ORDER_HPP 24 template<std::
size_t i,
typename T>
25 constexpr std::size_t max_tensor_order_impl(std::size_t result = 0)
27 if constexpr (i == 0) return result;
30 else return max_tensor_order_impl<i - 1, T>(result + 1);
45 template<
typename T,
typename =
void>
48 : std::integral_constant<std::size_t, indexible<T> ? dynamic_size : 0> {};
52 template<
typename T> requires (index_count_v<T> !=
dynamic_size)
58 : std::integral_constant<std::size_t, detail::max_tensor_order_impl<index_count_v<T>, T>()> {};
70 #endif //OPENKALMAN_MAX_TENSOR_ORDER_HPP constexpr bool dimension_size_of_index_is
Specifies that a given index of T has a specified size.
Definition: dimension_size_of_index_is.hpp:44
Definition: tuple_reverse.hpp:103
The maximum number of indices of structure T of size other than 1 (including any dynamic indices)...
Definition: max_tensor_order.hpp:47
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr std::size_t dynamic_size
A constant indicating that a size or index is dynamic.
Definition: global-definitions.hpp:33