|
template<size_t N = sizeof...(Dims), class = std::enable_if_t<(N > 0> |
NDARRAY_HOST_DEVICE | shape (const Dims &...dims) |
|
NDARRAY_HOST_DEVICE | shape (const shape &)=default |
|
NDARRAY_HOST_DEVICE | shape (shape &&)=default |
|
NDARRAY_HOST_DEVICE shape & | operator= (const shape &)=default |
|
NDARRAY_HOST_DEVICE shape & | operator= (shape &&)=default |
|
template<class... OtherDims, class = enable_if_dims_compatible<OtherDims...>> |
NDARRAY_HOST_DEVICE | shape (const std::tuple< OtherDims... > &other) |
|
template<class... OtherDims, class = enable_if_dims_compatible<OtherDims...>> |
NDARRAY_HOST_DEVICE | shape (OtherDims...other_dims) |
|
template<class... OtherDims, class = enable_if_dims_compatible<OtherDims...>> |
NDARRAY_HOST_DEVICE | shape (const shape< OtherDims... > &other) |
|
template<class... OtherDims, class = enable_if_dims_compatible<OtherDims...>> |
NDARRAY_HOST_DEVICE shape & | operator= (const shape< OtherDims... > &other) |
|
NDARRAY_HOST_DEVICE void | resolve () |
|
NDARRAY_HOST_DEVICE bool | is_resolved () const |
|
template<class... Args, class = enable_if_any_slices_or_indices<Args...>> |
NDARRAY_HOST_DEVICE bool | is_in_range (const std::tuple< Args... > &args) const |
|
template<class... Args, class = enable_if_any_slices_or_indices<Args...>> |
NDARRAY_HOST_DEVICE bool | is_in_range (Args...args) const |
|
NDARRAY_HOST_DEVICE index_t | operator[] (const index_type &indices) const |
|
template<class... Args, class = enable_if_all_indices<Args...>> |
NDARRAY_HOST_DEVICE index_t | operator() (Args...indices) const |
|
template<class... Args, class = enable_if_any_slices<Args...>> |
NDARRAY_HOST_DEVICE auto | operator[] (const std::tuple< Args... > &args) const |
|
template<class... Args, class = enable_if_any_slices<Args...>> |
NDARRAY_HOST_DEVICE auto | operator() (Args...args) const |
|
template<size_t D, class = enable_if_dim<D>> |
NDARRAY_HOST_DEVICE auto & | dim () |
|
template<size_t D, class = enable_if_dim<D>> |
NDARRAY_HOST_DEVICE const auto & | dim () const |
|
NDARRAY_HOST_DEVICE const nda::dim | dim (size_t d) const |
|
NDARRAY_HOST_DEVICE dims_type & | dims () |
|
NDARRAY_HOST_DEVICE const dims_type & | dims () const |
|
NDARRAY_HOST_DEVICE index_type | min () const |
|
NDARRAY_HOST_DEVICE index_type | max () const |
|
NDARRAY_HOST_DEVICE index_type | extent () const |
|
NDARRAY_HOST_DEVICE index_type | stride () const |
|
NDARRAY_HOST_DEVICE index_t | flat_min () const |
|
NDARRAY_HOST_DEVICE index_t | flat_max () const |
|
NDARRAY_HOST_DEVICE size_type | flat_extent () const |
|
NDARRAY_HOST_DEVICE size_type | size () const |
|
NDARRAY_HOST_DEVICE bool | empty () const |
|
NDARRAY_HOST_DEVICE bool | is_compact () const |
|
NDARRAY_HOST_DEVICE bool | is_one_to_one () const |
|
template<typename OtherShape > |
NDARRAY_HOST_DEVICE bool | is_subset_of (const OtherShape &other, index_t offset) const |
|
NDARRAY_HOST_DEVICE auto & | i () |
|
NDARRAY_HOST_DEVICE const auto & | i () const |
|
NDARRAY_HOST_DEVICE auto & | j () |
|
NDARRAY_HOST_DEVICE const auto & | j () const |
|
NDARRAY_HOST_DEVICE auto & | k () |
|
NDARRAY_HOST_DEVICE const auto & | k () const |
|
NDARRAY_HOST_DEVICE auto & | x () |
|
NDARRAY_HOST_DEVICE const auto & | x () const |
|
NDARRAY_HOST_DEVICE auto & | y () |
|
NDARRAY_HOST_DEVICE const auto & | y () const |
|
NDARRAY_HOST_DEVICE auto & | z () |
|
NDARRAY_HOST_DEVICE const auto & | z () const |
|
NDARRAY_HOST_DEVICE auto & | c () |
|
NDARRAY_HOST_DEVICE const auto & | c () const |
|
NDARRAY_HOST_DEVICE auto & | w () |
|
NDARRAY_HOST_DEVICE const auto & | w () const |
|
NDARRAY_HOST_DEVICE index_t | width () const |
|
NDARRAY_HOST_DEVICE index_t | height () const |
|
NDARRAY_HOST_DEVICE index_t | channels () const |
|
NDARRAY_HOST_DEVICE index_t | rows () const |
|
NDARRAY_HOST_DEVICE index_t | columns () const |
|
template<class... OtherDims, class = enable_if_same_rank<OtherDims...>> |
NDARRAY_HOST_DEVICE bool | operator== (const shape< OtherDims... > &other) const |
|
template<class... OtherDims, class = enable_if_same_rank<OtherDims...>> |
NDARRAY_HOST_DEVICE bool | operator!= (const shape< OtherDims... > &other) const |
|
template<class... Dims>
class nda::shape< Dims >
A list of Dim
objects describing a multi-dimensional space of indices. The rank
of a shape refers to the number of dimensions in the shape. The first dimension is known as the 'innermost' dimension, and dimensions then increase until the 'outermost' dimension.
Shapes map a multi-dimensional index x
to a flat offset by sum(dim<i>().flat_offset(std::get<i>(x)))
for i in [0, Rank)
.