HOPS
HOPS class reference
Public Types | Public Member Functions | List of all members
hops::MHO_NDArrayWrapper< XValueType, RANK > Class Template Reference

Class MHO_NDArrayWrapper. More...

#include <MHO_NDArrayWrapper.hh>

Inheritance diagram for hops::MHO_NDArrayWrapper< XValueType, RANK >:
[legend]

Public Types

using const_iterator = MHO_BidirectionalConstIterator< XValueType >
 
using const_stride_iterator = MHO_BidirectionalConstStrideIterator< XValueType >
 
using index_type = std::array< std::size_t, RANK >
 
using iterator = MHO_BidirectionalIterator< XValueType >
 
typedef std::integral_constant< std::size_t, RANK > rank
 
using stride_iterator = MHO_BidirectionalStrideIterator< XValueType >
 
using value_type = XValueType
 

Public Member Functions

 MHO_NDArrayWrapper ()
 
 MHO_NDArrayWrapper (const MHO_NDArrayWrapper &obj)
 
 MHO_NDArrayWrapper (const std::size_t *dim)
 
 MHO_NDArrayWrapper (XValueType *ptr, const std::size_t *dim)
 
virtual ~MHO_NDArrayWrapper ()
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)==RANK), XValueType & >::type at (XIndexTypeS... idx)
 at(): same as operator(...) but with bounds checking with bounds checking More...
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)==RANK), const XValueType & >::type at (XIndexTypeS... idx) const
 at(): same as const operator(...) but with bounds checking with bounds checking More...
 
iterator begin ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
bool CheckIndexValidity (const index_type &idx) const
 
const_iterator citerator_at (std::size_t offset) const
 
MHO_NDArrayWrapperClone ()
 clone functionality - creates a deep copy of this MHO_NDArrayWrapper object. More...
 
virtual void Copy (const MHO_NDArrayView< XValueType, RANK > &rhs)
 
virtual void Copy (const MHO_NDArrayWrapper &rhs)
 
const_stride_iterator cstride_begin (std::size_t stride) const
 
const_stride_iterator cstride_end (std::size_t stride) const
 
const_stride_iterator cstride_iterator_at (std::size_t offset, std::size_t stride) const
 
iterator end ()
 
XValueType * GetData ()
 access to underlying data pointer (unsafe) More...
 
const XValueType * GetData () const
 
std::size_t GetDimension (std::size_t idx) const
 Getter for dimension. More...
 
index_type GetDimensionArray () const
 Getter for dimension array. More...
 
const std::size_t * GetDimensions () const
 get the dimensions/shape of the array More...
 
void GetDimensions (std::size_t *dim) const
 Getter for dimensions, fills passed array. More...
 
index_type GetIndicesForOffset (std::size_t offset)
 invert (memory) offset into array to indexes of the associated element More...
 
std::size_t GetOffsetForIndices (const std::size_t *index)
 compute (memory) offset into array from a set of indexes More...
 
std::size_t GetRank () const
 Getter for the rank (dimensionality) of the array. More...
 
std::size_t GetSize () const
 get the total size of the array More...
 
std::size_t GetStride (std::size_t idx) const
 
index_type GetStrideArray () const
 
const std::size_t * GetStrides () const
 Getter for element strides (along each dimension) More...
 
void GetStrides (std::size_t *strd) const
 Getter for strides (along each dimension), fills passed array. More...
 
iterator iterator_at (std::size_t offset)
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)==RANK), XValueType & >::type operator() (XIndexTypeS... idx)
 access operator, accepts multiple indices (,,...,) but does no bounds checking More...
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)==RANK), const XValueType & >::type operator() (XIndexTypeS... idx) const
 const reference access operator, accepts multiple indices (,,...,) but does no bounds checking More...
 
MHO_NDArrayWrapperoperator*= (const MHO_NDArrayWrapper &anArray)
 operator*= in place point-wise multiplication by another array More...
 
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper & >::type operator*= (T aScalar)
 operator*= in place multiplication by a scalar factor More...
 
MHO_NDArrayWrapperoperator+= (const MHO_NDArrayWrapper &anArray)
 operator+= in place point-wise addition by another array More...
 
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper & >::type operator+= (T aScalar)
 operator+= in place addition by a scalar amount More...
 
MHO_NDArrayWrapperoperator-= (const MHO_NDArrayWrapper &anArray)
 operator-= in place point-wise subtraction by another array More...
 
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper & >::type operator-= (T aScalar)
 operator+= in place addition by a scalar amount More...
 
MHO_NDArrayWrapperoperator= (const MHO_NDArrayWrapper &rhs)
 
XValueType & operator[] (std::size_t i)
 
const XValueType & operator[] (std::size_t i) const
 
virtual void Resize (const std::size_t *dim)
 Destroys contents and resizes using passed dimensions. More...
 
template<typename... XDimSizeTypeS>
std::enable_if<(sizeof...(XDimSizeTypeS)==RANK), void >::type Resize (XDimSizeTypeS... dim)
 Resize function that destroys contents and resizes according to dimension arguments. More...
 
void SetArray (const XValueType &obj)
 set all elements in the array to a certain value More...
 
void SetExternalData (XValueType *ptr, const std::size_t *dim)
 set data pointer to externally managed array with associated dimensions More...
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)==RANK), MHO_NDArrayView< XValueType, count_instances_of_type< const char *, sizeof...(XIndexTypeS) - 1, XIndexTypeS... >::value > >::type SliceView (XIndexTypeS... idx)
 creates a slice-view of the array (given n < RANK indexes), return the remaining chunk of the array with freely spanning indexes the placeholder for the free-spanning indexes is the character ":" for example: a ndarray X of RANK=3, and sizes [4,12,32], then SliceView(":",3,":") returns an MHO_NDArrayView of RANK=2, and dimensions [4,32] starting at the location of X(0,3,0), and spanning the data covered by X(":",3,":") Data of the slice-view points to data owned by original array X More...
 
stride_iterator stride_begin (std::size_t stride)
 
stride_iterator stride_end (std::size_t stride)
 
stride_iterator stride_iterator_at (std::size_t offset, std::size_t stride)
 
template<typename... XIndexTypeS>
std::enable_if<(sizeof...(XIndexTypeS)< RANK), MHO_NDArrayView< XValueType, RANK -(sizeof...(XIndexTypeS)) > >::type SubView (XIndexTypeS... idx)
 creates a sub-view of the array (given n < RANK leading indexes), return the remaining chunk of the array with freely spanning indexes for example: a ndarray X of RANK=3, and sizes [4,12,32], then SubView(2) returns an MHO_NDArrayView of RANK=2, and dimensions [12,32] starting at the location of X(2,0,0). Data of the subview points to data owned by X More...
 
XValueType & ValueAt (const index_type &idx)
 
const XValueType & ValueAt (const index_type &idx) const
 
void ZeroArray ()
 set all elements in the array to zero More...
 
- Public Member Functions inherited from hops::MHO_ExtensibleElement
 MHO_ExtensibleElement ()
 
virtual ~MHO_ExtensibleElement ()
 
void Accept (MHO_Visitor *aVisitor) override
 Visits all extensions of MHO_ExtensibleElement using given visitor. More...
 
template<class XExtensionType >
MHO_ExtendedElement< XExtensionType > * AsExtension ()
 Returns an extension of type XExtensionType if found in the list of extensions. More...
 
template<class XExtensionType >
bool HasExtension () const
 Checks if an extensible element has a specific extension type. More...
 
template<class XExtensionType >
MHO_ExtendedElement< XExtensionType > * MakeExtension ()
 Creates and adds a new extension of type XExtensionType to the list of extensions. More...
 
- Public Member Functions inherited from hops::MHO_Element
 MHO_Element ()
 
virtual ~MHO_Element ()
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_ExtensibleElement
std::vector< MHO_Element * > fExtensions
 

Detailed Description

template<typename XValueType, std::size_t RANK>
class hops::MHO_NDArrayWrapper< XValueType, RANK >

Class MHO_NDArrayWrapper.

MHO_NDArrayWrapper is a class to represent a n-dimensional array (implemented around a 1-d memory array)

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Mon May 11 15:51:26 2020 -0400

Thu 13 Aug 2020 02:53:11 PM EDT

Member Typedef Documentation

◆ const_iterator

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::const_iterator = MHO_BidirectionalConstIterator< XValueType >

◆ const_stride_iterator

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::const_stride_iterator = MHO_BidirectionalConstStrideIterator< XValueType >

◆ index_type

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::index_type = std::array< std::size_t, RANK >

◆ iterator

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::iterator = MHO_BidirectionalIterator< XValueType >

◆ rank

template<typename XValueType , std::size_t RANK>
typedef std::integral_constant< std::size_t, RANK > hops::MHO_NDArrayWrapper< XValueType, RANK >::rank

◆ stride_iterator

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::stride_iterator = MHO_BidirectionalStrideIterator< XValueType >

◆ value_type

template<typename XValueType , std::size_t RANK>
using hops::MHO_NDArrayWrapper< XValueType, RANK >::value_type = XValueType

Constructor & Destructor Documentation

◆ MHO_NDArrayWrapper() [1/4]

template<typename XValueType , std::size_t RANK>
hops::MHO_NDArrayWrapper< XValueType, RANK >::MHO_NDArrayWrapper ( )
inline

◆ MHO_NDArrayWrapper() [2/4]

template<typename XValueType , std::size_t RANK>
hops::MHO_NDArrayWrapper< XValueType, RANK >::MHO_NDArrayWrapper ( const std::size_t *  dim)
inline

◆ MHO_NDArrayWrapper() [3/4]

template<typename XValueType , std::size_t RANK>
hops::MHO_NDArrayWrapper< XValueType, RANK >::MHO_NDArrayWrapper ( XValueType *  ptr,
const std::size_t *  dim 
)
inline

◆ MHO_NDArrayWrapper() [4/4]

template<typename XValueType , std::size_t RANK>
hops::MHO_NDArrayWrapper< XValueType, RANK >::MHO_NDArrayWrapper ( const MHO_NDArrayWrapper< XValueType, RANK > &  obj)
inline

◆ ~MHO_NDArrayWrapper()

template<typename XValueType , std::size_t RANK>
virtual hops::MHO_NDArrayWrapper< XValueType, RANK >::~MHO_NDArrayWrapper ( )
inlinevirtual

Member Function Documentation

◆ at() [1/2]

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) == RANK), XValueType& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::at ( XIndexTypeS...  idx)
inline

at(): same as operator(...) but with bounds checking with bounds checking

  • uses std::enable_if to do a compile-time check that the number of arguments is the same as the rank of the array
    Parameters
    ...varargs The variable arguments (integers) representing the data element indexes
    Returns
    the element at the specified indexes,throws exception if it doesn't exist

◆ at() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) == RANK), const XValueType& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::at ( XIndexTypeS...  idx) const
inline

at(): same as const operator(...) but with bounds checking with bounds checking

  • uses std::enable_if to do a compile-time check that the number of arguments is the same as the rank of the array
    Parameters
    ...varargs The variable arguments (integers) representing the data element indexes
    Returns
    a const reference to element at the specified indexes, throws exception if it doesn't exist

◆ begin()

template<typename XValueType , std::size_t RANK>
iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::begin ( )
inline

◆ cbegin()

template<typename XValueType , std::size_t RANK>
const_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::cbegin ( ) const
inline

◆ cend()

template<typename XValueType , std::size_t RANK>
const_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::cend ( ) const
inline

◆ CheckIndexValidity()

template<typename XValueType , std::size_t RANK>
bool hops::MHO_NDArrayWrapper< XValueType, RANK >::CheckIndexValidity ( const index_type idx) const
inline

◆ citerator_at()

template<typename XValueType , std::size_t RANK>
const_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::citerator_at ( std::size_t  offset) const
inline

◆ Clone()

template<typename XValueType , std::size_t RANK>
MHO_NDArrayWrapper* hops::MHO_NDArrayWrapper< XValueType, RANK >::Clone ( )
inline

clone functionality - creates a deep copy of this MHO_NDArrayWrapper object.

Returns
A new MHO_NDArrayWrapper instance containing a clone of this object's data.

◆ Copy() [1/2]

template<typename XValueType , std::size_t RANK>
virtual void hops::MHO_NDArrayWrapper< XValueType, RANK >::Copy ( const MHO_NDArrayView< XValueType, RANK > &  rhs)
inlinevirtual

◆ Copy() [2/2]

template<typename XValueType , std::size_t RANK>
virtual void hops::MHO_NDArrayWrapper< XValueType, RANK >::Copy ( const MHO_NDArrayWrapper< XValueType, RANK > &  rhs)
inlinevirtual

◆ cstride_begin()

template<typename XValueType , std::size_t RANK>
const_stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::cstride_begin ( std::size_t  stride) const
inline

◆ cstride_end()

template<typename XValueType , std::size_t RANK>
const_stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::cstride_end ( std::size_t  stride) const
inline

◆ cstride_iterator_at()

template<typename XValueType , std::size_t RANK>
const_stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::cstride_iterator_at ( std::size_t  offset,
std::size_t  stride 
) const
inline

◆ end()

template<typename XValueType , std::size_t RANK>
iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::end ( )
inline

◆ GetData() [1/2]

template<typename XValueType , std::size_t RANK>
XValueType* hops::MHO_NDArrayWrapper< XValueType, RANK >::GetData ( )
inline

access to underlying data pointer (unsafe)

◆ GetData() [2/2]

template<typename XValueType , std::size_t RANK>
const XValueType* hops::MHO_NDArrayWrapper< XValueType, RANK >::GetData ( ) const
inline

◆ GetDimension()

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_NDArrayWrapper< XValueType, RANK >::GetDimension ( std::size_t  idx) const
inline

Getter for dimension.

Parameters
param(std::size_t)
Returns
Pointer to the first element of the dimension array.

◆ GetDimensionArray()

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_NDArrayWrapper< XValueType, RANK >::GetDimensionArray ( ) const
inline

Getter for dimension array.

Returns
index_type&: Reference to the dimension array.

◆ GetDimensions() [1/2]

template<typename XValueType , std::size_t RANK>
const std::size_t* hops::MHO_NDArrayWrapper< XValueType, RANK >::GetDimensions ( ) const
inline

get the dimensions/shape of the array

Returns
Pointer to std::size_t array representing dimensions

◆ GetDimensions() [2/2]

template<typename XValueType , std::size_t RANK>
void hops::MHO_NDArrayWrapper< XValueType, RANK >::GetDimensions ( std::size_t *  dim) const
inline

Getter for dimensions, fills passed array.

Returns
Pointer to std::size_t array

◆ GetIndicesForOffset()

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_NDArrayWrapper< XValueType, RANK >::GetIndicesForOffset ( std::size_t  offset)
inline

invert (memory) offset into array to indexes of the associated element

◆ GetOffsetForIndices()

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_NDArrayWrapper< XValueType, RANK >::GetOffsetForIndices ( const std::size_t *  index)
inline

compute (memory) offset into array from a set of indexes

◆ GetRank()

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_NDArrayWrapper< XValueType, RANK >::GetRank ( ) const
inline

Getter for the rank (dimensionality) of the array.

Returns
std::size_t representing the rank of the array

◆ GetSize()

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_NDArrayWrapper< XValueType, RANK >::GetSize ( ) const
inline

get the total size of the array

Returns
The number of elements in the data.

◆ GetStride()

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_NDArrayWrapper< XValueType, RANK >::GetStride ( std::size_t  idx) const
inline

◆ GetStrideArray()

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_NDArrayWrapper< XValueType, RANK >::GetStrideArray ( ) const
inline

◆ GetStrides() [1/2]

template<typename XValueType , std::size_t RANK>
const std::size_t* hops::MHO_NDArrayWrapper< XValueType, RANK >::GetStrides ( ) const
inline

Getter for element strides (along each dimension)

Returns
Pointer to the first element of fStrides array

◆ GetStrides() [2/2]

template<typename XValueType , std::size_t RANK>
void hops::MHO_NDArrayWrapper< XValueType, RANK >::GetStrides ( std::size_t *  strd) const
inline

Getter for strides (along each dimension), fills passed array.

Returns
Pointer to std::size_t array

◆ iterator_at()

template<typename XValueType , std::size_t RANK>
iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::iterator_at ( std::size_t  offset)
inline

◆ operator()() [1/2]

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) == RANK), XValueType& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::operator() ( XIndexTypeS...  idx)
inline

access operator, accepts multiple indices (,,...,) but does no bounds checking

  • uses std::enable_if to do a compile-time check that the number of arguments is the same as the rank of the array
    Parameters
    ...varargs The variable arguments (integers) representing the data element indexes
    Returns
    the element at the specified indexes

◆ operator()() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) == RANK), const XValueType& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::operator() ( XIndexTypeS...  idx) const
inline

const reference access operator, accepts multiple indices (,,...,) but does no bounds checking

  • uses std::enable_if to do a compile-time check that the number of arguments is the same as the rank of the array
    Parameters
    ...varargs The variable arguments (integers) representing the data element indexes
    Returns
    a const reference to element at the specified indexes

◆ operator*=() [1/2]

template<typename XValueType , std::size_t RANK>
MHO_NDArrayWrapper& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator*= ( const MHO_NDArrayWrapper< XValueType, RANK > &  anArray)
inline

operator*= in place point-wise multiplication by another array

◆ operator*=() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::operator*= ( aScalar)
inline

operator*= in place multiplication by a scalar factor

◆ operator+=() [1/2]

template<typename XValueType , std::size_t RANK>
MHO_NDArrayWrapper& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator+= ( const MHO_NDArrayWrapper< XValueType, RANK > &  anArray)
inline

operator+= in place point-wise addition by another array

◆ operator+=() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::operator+= ( aScalar)
inline

operator+= in place addition by a scalar amount

◆ operator-=() [1/2]

template<typename XValueType , std::size_t RANK>
MHO_NDArrayWrapper& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator-= ( const MHO_NDArrayWrapper< XValueType, RANK > &  anArray)
inline

operator-= in place point-wise subtraction by another array

◆ operator-=() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename T >
std::enable_if< std::is_same< XValueType, T >::value or std::is_integral< T >::value or std::is_floating_point< T >::value, MHO_NDArrayWrapper& >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::operator-= ( aScalar)
inline

operator+= in place addition by a scalar amount

◆ operator=()

template<typename XValueType , std::size_t RANK>
MHO_NDArrayWrapper& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator= ( const MHO_NDArrayWrapper< XValueType, RANK > &  rhs)
inline

◆ operator[]() [1/2]

template<typename XValueType , std::size_t RANK>
XValueType& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator[] ( std::size_t  i)
inline

◆ operator[]() [2/2]

template<typename XValueType , std::size_t RANK>
const XValueType& hops::MHO_NDArrayWrapper< XValueType, RANK >::operator[] ( std::size_t  i) const
inline

◆ Resize() [1/2]

template<typename XValueType , std::size_t RANK>
virtual void hops::MHO_NDArrayWrapper< XValueType, RANK >::Resize ( const std::size_t *  dim)
inlinevirtual

◆ Resize() [2/2]

template<typename XValueType , std::size_t RANK>
template<typename... XDimSizeTypeS>
std::enable_if< (sizeof...(XDimSizeTypeS) == RANK), void >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::Resize ( XDimSizeTypeS...  dim)
inline

Resize function that destroys contents and resizes according to dimension arguments.

Template Parameters
XDimSizeTypeSTemplate parameter XDimSizeTypeS
Parameters
dimInput dimensions as variadic template XDimSizeTypeS...
Returns
void

◆ SetArray()

template<typename XValueType , std::size_t RANK>
void hops::MHO_NDArrayWrapper< XValueType, RANK >::SetArray ( const XValueType &  obj)
inline

set all elements in the array to a certain value

◆ SetExternalData()

template<typename XValueType , std::size_t RANK>
void hops::MHO_NDArrayWrapper< XValueType, RANK >::SetExternalData ( XValueType *  ptr,
const std::size_t *  dim 
)
inline

set data pointer to externally managed array with associated dimensions

Parameters
ptrPointer to externally managed XValueType array
dimArray of dimension sizes

◆ SliceView()

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) == RANK), MHO_NDArrayView< XValueType, count_instances_of_type< const char*, sizeof...(XIndexTypeS) - 1, XIndexTypeS... >::value > >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::SliceView ( XIndexTypeS...  idx)
inline

creates a slice-view of the array (given n < RANK indexes), return the remaining chunk of the array with freely spanning indexes the placeholder for the free-spanning indexes is the character ":" for example: a ndarray X of RANK=3, and sizes [4,12,32], then SliceView(":",3,":") returns an MHO_NDArrayView of RANK=2, and dimensions [4,32] starting at the location of X(0,3,0), and spanning the data covered by X(":",3,":") Data of the slice-view points to data owned by original array X

value

◆ stride_begin()

template<typename XValueType , std::size_t RANK>
stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::stride_begin ( std::size_t  stride)
inline

◆ stride_end()

template<typename XValueType , std::size_t RANK>
stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::stride_end ( std::size_t  stride)
inline

◆ stride_iterator_at()

template<typename XValueType , std::size_t RANK>
stride_iterator hops::MHO_NDArrayWrapper< XValueType, RANK >::stride_iterator_at ( std::size_t  offset,
std::size_t  stride 
)
inline

◆ SubView()

template<typename XValueType , std::size_t RANK>
template<typename... XIndexTypeS>
std::enable_if< (sizeof...(XIndexTypeS) < RANK), MHO_NDArrayView< XValueType, RANK - (sizeof...(XIndexTypeS)) > >::type hops::MHO_NDArrayWrapper< XValueType, RANK >::SubView ( XIndexTypeS...  idx)
inline

creates a sub-view of the array (given n < RANK leading indexes), return the remaining chunk of the array with freely spanning indexes for example: a ndarray X of RANK=3, and sizes [4,12,32], then SubView(2) returns an MHO_NDArrayView of RANK=2, and dimensions [12,32] starting at the location of X(2,0,0). Data of the subview points to data owned by X

◆ ValueAt() [1/2]

template<typename XValueType , std::size_t RANK>
XValueType& hops::MHO_NDArrayWrapper< XValueType, RANK >::ValueAt ( const index_type idx)
inline

◆ ValueAt() [2/2]

template<typename XValueType , std::size_t RANK>
const XValueType& hops::MHO_NDArrayWrapper< XValueType, RANK >::ValueAt ( const index_type idx) const
inline

◆ ZeroArray()

template<typename XValueType , std::size_t RANK>
void hops::MHO_NDArrayWrapper< XValueType, RANK >::ZeroArray ( )
inline

set all elements in the array to zero


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