Stratax 0.2.0
Loading...
Searching...
No Matches
stratax::ops::detail Namespace Reference

Classes

struct  ResolvedSlice

Functions

std::ptrdiff_t clamp (std::ptrdiff_t value, std::ptrdiff_t lower, std::ptrdiff_t upper)
ResolvedSlice normalize_slice (const stratax::core::Slice &slice, std::size_t extent, const char *message)
template<std::size_t N, std::size_t... Is>
stratax::core::Shape shape_from_slices_impl (const std::array< stratax::core::Slice, N > &ranges, std::index_sequence< Is... >)
 Builds a shape from a compile-time slice array.
template<std::size_t N>
stratax::core::Shape shape_from_slices (const std::array< stratax::core::Slice, N > &ranges)
 Builds a shape from a slice array.

Function Documentation

◆ clamp()

std::ptrdiff_t stratax::ops::detail::clamp ( std::ptrdiff_t value,
std::ptrdiff_t lower,
std::ptrdiff_t upper )
inline

Definition at line 28 of file Slice.hpp.

◆ normalize_slice()

ResolvedSlice stratax::ops::detail::normalize_slice ( const stratax::core::Slice & slice,
std::size_t extent,
const char * message )
inline

Definition at line 41 of file Slice.hpp.

◆ shape_from_slices()

template<std::size_t N>
stratax::core::Shape stratax::ops::detail::shape_from_slices ( const std::array< stratax::core::Slice, N > & ranges)

Builds a shape from a slice array.

Template Parameters
NNumber of dimensions.
Parameters
rangesSlice ranges.
Returns
Shape whose dimensions match the slice extents.

Definition at line 120 of file Slice.hpp.

◆ shape_from_slices_impl()

template<std::size_t N, std::size_t... Is>
stratax::core::Shape stratax::ops::detail::shape_from_slices_impl ( const std::array< stratax::core::Slice, N > & ranges,
std::index_sequence< Is... >  )

Builds a shape from a compile-time slice array.

Template Parameters
NNumber of dimensions.
IsIndex sequence used to expand the slice array.
Parameters
rangesSlice ranges.
Returns
Shape whose dimensions match the slice extents.

Definition at line 104 of file Slice.hpp.