16 #ifndef OPENKALMAN_GET_CHIP_HPP 17 #define OPENKALMAN_GET_CHIP_HPP 36 template<std::size_t...indices,
indexible Arg,
values::index...Ixs> requires (
sizeof...(indices) ==
sizeof...(Ixs))
38 template<std::size_t...indices,
typename Arg,
typename...Ixs, std::enable_if_t<
39 indexible<Arg> and (values::index<Ixs> and ...) and (
sizeof...(indices) ==
sizeof...(Ixs)),
int> = 0>
41 constexpr decltype(
auto)
45 if constexpr (values::fixed<Ixs> and not dynamic_dimension<Arg, indices>)
49 if constexpr (
sizeof...(indices) == 0)
return std::forward<Arg>(arg);
51 std::forward<Arg>(arg),
53 std::tuple{(std::integral_constant<decltype(indices), 1> {})...});
59 #endif //OPENKALMAN_GET_CHIP_HPP decltype(auto) constexpr get_slice(Arg &&arg, const std::tuple< Offset... > &offsets, const std::tuple< Extent... > &extents)
Extract a slice from a matrix or tensor.
Definition: get_slice.hpp:101
decltype(auto) constexpr get_chip(Arg &&arg, Ixs...ixs)
Extract a sub-array having rank less than the rank of the input object.
Definition: get_chip.hpp:42
constexpr bool indexible
T is a generalized tensor type.
Definition: indexible.hpp:32
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr bool index
T is an index value.
Definition: index.hpp:56