Schnek
schnek::SingleArrayGridStorageBase< T, rank, AllocationPolicy > Class Template Reference

The storage base extends from an allocation policy and adds some accessor methods. More...

#include <single-array-storage-base.hpp>

Inheritance diagram for schnek::SingleArrayGridStorageBase< T, rank, AllocationPolicy >:
Collaboration diagram for schnek::SingleArrayGridStorageBase< T, rank, AllocationPolicy >:

Public Types

typedef Array< int, rank > IndexType
 The grid index type.
 
typedef Range< int, rank > RangeType
 The grid range type.
 
typedef T * storage_iterator
 
typedef const T * const_storage_iterator
 

Public Member Functions

 SingleArrayGridStorageBase ()
 Default constructor.
 
 SingleArrayGridStorageBase (const SingleArrayGridStorageBase &)=default
 Copy constructor.
 
SingleArrayGridStorageBase< T, rank, AllocationPolicy > & operator= (const SingleArrayGridStorageBase< T, rank, AllocationPolicy > &)=default
 Assignment operator.
 
T * getRawData () const
 Access to the underlying raw data.
 
SCHNEK_INLINE const IndexTypegetLo () const
 Get the lowest coordinate in the grid (inclusive)
 
SCHNEK_INLINE const IndexTypegetHi () const
 Get the highest coordinate in the grid (inclusive)
 
SCHNEK_INLINE const RangeTypegetRange () const
 Get the lowest coordinate in the grid (inclusive)
 
SCHNEK_INLINE const IndexTypegetDims () const
 Get the dimensions of the grid dims = high - low + 1
 
SCHNEK_INLINE int getLo (int k) const
 Get k-th component of the lowest coordinate in the grid (inclusive)
 
SCHNEK_INLINE int getHi (int k) const
 Get k-th component of the highest coordinate in the grid (inclusive)
 
SCHNEK_INLINE int getDims (int k) const
 Get k-th component of the dimensions of the grid dims = high - low + 1
 
SCHNEK_INLINE int getSize () const
 Get the length of the allocated array.
 
SCHNEK_INLINE storage_iterator begin ()
 
SCHNEK_INLINE storage_iterator end ()
 
SCHNEK_INLINE const_storage_iterator cbegin () const
 
SCHNEK_INLINE const_storage_iterator cend () const
 

Detailed Description

template<typename T, size_t rank, template< typename, size_t > class AllocationPolicy>
class schnek::SingleArrayGridStorageBase< T, rank, AllocationPolicy >

The storage base extends from an allocation policy and adds some accessor methods.

Template Parameters
TThe type of data stored in the grid
rankThe rank of the grid
AllocationPolicyThe allocation policy

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