ALPSCore reference
Public Types | Public Member Functions | Static Protected Member Functions | List of all members
alps::alea::ndview< T > Class Template Reference

#include <core.hpp>

Inheritance diagram for alps::alea::ndview< T >:
Inheritance graph
Collaboration diagram for alps::alea::ndview< T >:
Collaboration graph

Public Types

typedef T value_type
 
- Public Types inherited from alps::alea::view< T >
typedef T value_type
 

Public Member Functions

 ndview ()
 
 ndview (T *data, const size_t *shape, size_t ndim)
 
 ndview (T *data, size_t size, const size_t *shape, size_t ndim)
 
const size_t * shape () const
 
size_t ndim () const
 
- Public Member Functions inherited from alps::alea::view< T >
 view ()
 
 view (T *data, size_t size)
 
T * data ()
 
const T * data () const
 
size_t size () const
 

Static Protected Member Functions

static size_t compute_size (const size_t *shape, size_t ndim)
 

Detailed Description

template<typename T>
class alps::alea::ndview< T >

Data view as a thin wrapper around a continuous multi-dimensional array.

Basically collects a pointer continuous array in ROW-MAJOR format (vector, transposed Eigen array, C array etc.) together with its shape. Note that the view neither owns the data pointer nor the shape pointer. Thus it amends view<T> with shape information.

Definition at line 90 of file core.hpp.

Member Typedef Documentation

template<typename T>
typedef T alps::alea::ndview< T >::value_type

Definition at line 94 of file core.hpp.

Constructor & Destructor Documentation

template<typename T>
alps::alea::ndview< T >::ndview ( )
inline

Construct view on nothing

Definition at line 98 of file core.hpp.

template<typename T>
alps::alea::ndview< T >::ndview ( T *  data,
const size_t *  shape,
size_t  ndim 
)
inline

Construct view on data area with shape

Definition at line 101 of file core.hpp.

template<typename T>
alps::alea::ndview< T >::ndview ( T *  data,
size_t  size,
const size_t *  shape,
size_t  ndim 
)
inline

Construct view on data area with shape and size hint

Definition at line 108 of file core.hpp.

Member Function Documentation

template<typename T>
static size_t alps::alea::ndview< T >::compute_size ( const size_t *  shape,
size_t  ndim 
)
inlinestaticprotected

Definition at line 123 of file core.hpp.

template<typename T>
size_t alps::alea::ndview< T >::ndim ( ) const
inline

Get number of dimensions

Definition at line 120 of file core.hpp.

template<typename T>
const size_t* alps::alea::ndview< T >::shape ( ) const
inline

Get shape of data space

Definition at line 117 of file core.hpp.


The documentation for this class was generated from the following file: