|
NDARRAY_HOST_DEVICE | array_ref (pointer base=nullptr, const Shape &shape=Shape()) |
|
NDARRAY_HOST_DEVICE | array_ref (pointer base, const Shape &shape, internal::no_resolve) |
|
NDARRAY_HOST_DEVICE | array_ref (const array_ref &other)=default |
|
NDARRAY_HOST_DEVICE | array_ref (array_ref &&other)=default |
|
NDARRAY_HOST_DEVICE array_ref & | operator= (const array_ref &other)=default |
|
NDARRAY_HOST_DEVICE array_ref & | operator= (array_ref &&other)=default |
|
template<class OtherShape , class = enable_if_shape_compatible<OtherShape>> |
NDARRAY_HOST_DEVICE | array_ref (const array_ref< T, OtherShape > &other) |
|
template<class OtherShape , class = enable_if_shape_compatible<OtherShape>> |
NDARRAY_HOST_DEVICE array_ref & | operator= (const array_ref< T, OtherShape > &other) |
|
NDARRAY_HOST_DEVICE reference | operator[] (const index_type &indices) const |
|
template<class... Args, class = enable_if_all_indices<Args...>> |
NDARRAY_HOST_DEVICE reference | 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<class Fn , class = internal::enable_if_callable<Fn, reference>> |
NDARRAY_HOST_DEVICE void | for_each_value (Fn &&fn) const |
|
NDARRAY_HOST_DEVICE pointer | base () const |
|
NDARRAY_HOST_DEVICE pointer | data () const |
|
NDARRAY_HOST_DEVICE Shape & | shape () |
|
NDARRAY_HOST_DEVICE const Shape & | shape () 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 |
|
const nda::dim | dim (size_t d) const |
|
NDARRAY_HOST_DEVICE size_type | size () const |
|
NDARRAY_HOST_DEVICE bool | empty () const |
|
NDARRAY_HOST_DEVICE bool | is_compact () 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 |
|
NDARRAY_HOST_DEVICE bool | operator!= (const array_ref &other) const |
|
NDARRAY_HOST_DEVICE bool | operator== (const array_ref &other) const |
|
NDARRAY_HOST_DEVICE const array_ref< T, Shape > & | ref () const |
|
NDARRAY_HOST_DEVICE const const_array_ref< T, Shape > | cref () const |
|
NDARRAY_HOST_DEVICE | operator const_array_ref< T, Shape > () const |
|
template<std::size_t R = rank(), typename = std::enable_if_t<R == 0>> |
NDARRAY_HOST_DEVICE | operator reference () const |
|
NDARRAY_HOST_DEVICE void | set_shape (const Shape &new_shape, index_t offset=0) |
|
template<class T, class Shape>
class nda::array_ref< T, Shape >
A reference to an array is an object with a shape mapping indices to flat offsets, which are used to dereference a pointer. This object does not own any memory, and it is cheap to copy.