atlas
|
Multi-dimensional access existing POD array pointer. More...
#include <LocalView.h>
Public Types | |
using | value_type = Value |
using | return_type = value_type |
Public Member Functions | |
LocalView (value_type *data, const idx_t shape[], const idx_t strides[]) | |
LocalView (value_type *data, const idx_t shape[], const idx_t strides[]) | |
LocalView (value_type *data, const idx_t shape[]) | |
LocalView (value_type *data, const idx_t shape[]) | |
template<typename value_type , typename = typename std::enable_if<std::is_const<Value>::value && !std::is_const<value_type>::value>::type> | |
LocalView (value_type *data, const ArrayShape &shape) | |
LocalView (value_type *data, const ArrayShape &shape) | |
operator const LocalView< value_type, Rank > & () const | |
template<typename... Ints> | |
value_type & | operator() (Ints... idx) |
template<typename... Ints> | |
const value_type & | operator() (Ints... idx) const |
template<typename Int , bool EnableBool = true> | |
std::enable_if<(Rank==1 &&EnableBool), const value_type & >::type | operator[] (Int idx) const |
template<typename Int , bool EnableBool = true> | |
std::enable_if<(Rank==1 &&EnableBool), value_type & >::type | operator[] (Int idx) |
idx_t | size () const |
template<typename Int > | |
idx_t | shape (Int idx) const |
template<typename Int > | |
idx_t | stride (Int idx) const |
const idx_t * | shape () const |
const idx_t * | strides () const |
value_type const * | data () const |
value_type * | data () |
bool | contiguous () const |
ENABLE_IF_NON_CONST void | assign (const value_type &value) |
void | dump (std::ostream &os) const |
template<typename... Args> | |
slice_t< Args... >::type | slice (Args... args) |
template<typename... Args> | |
const_slice_t< Args... >::type | slice (Args... args) const |
Static Public Member Functions | |
static constexpr idx_t | rank () |
Static Public Attributes | |
static constexpr int | RANK {Rank} |
Friends | |
std::ostream & | operator<< (std::ostream &out, const LocalView &x) |
Multi-dimensional access existing POD array pointer.
A LocalView is a wrapper around data that enables multidimensional access, and has the exact same API as ArrayView.
The data may be strided.
Strides can also be omitted as for most common cases it can be inferred from the shape.