QDP++
QDP::multi4d< T > Class Template Reference

Container for a multi-dimensional 4D array. More...

#include <qdp_multi.h>

Public Member Functions

 multi4d ()
 multi4d (T *f, int ns4, int ns3, int ns2, int ns1)
 multi4d (int ns4, int ns3, int ns2, int ns1)
 ~multi4d ()
 multi4d (const multi4d &s)
 Copy constructor.
void resize (int ns4, int ns3, int ns2, int ns1)
 Allocate mem for the array.
int size1 () const
 Size of array.
int size2 () const
int size3 () const
int size4 () const
multi4d< T > & operator= (const multi4d< T > &s1)
 Equal operator uses underlying = of T.
template<class T1>
multi4d< T > & operator= (const T1 &s1)
 Equal operator uses underlying = of T.
const T * slice (int l, int k, int j) const
 Return ref to a column slice.
T & operator() (int l, int k, int j, int i)
 Return ref to an element.
const T & operator() (int l, int k, int j, int i) const
 Return const ref to an element.
multi3d< T > operator[] (int l)
 Return ref to an element.
const multi3d< T > operator[] (int l) const
 Return const ref to an element.

Detailed Description

template<class T>
class QDP::multi4d< T >

Container for a multi-dimensional 4D array.

Definition at line 831 of file qdp_multi.h.

Constructor & Destructor Documentation

◆ multi4d() [1/4]

template<class T>
QDP::multi4d< T >::multi4d ( )
inline

Definition at line 834 of file qdp_multi.h.

Referenced by multi4d(), operator=(), and operator=().

◆ multi4d() [2/4]

template<class T>
QDP::multi4d< T >::multi4d ( T * f,
int ns4,
int ns3,
int ns2,
int ns1 )
inline

Definition at line 835 of file qdp_multi.h.

◆ multi4d() [3/4]

template<class T>
QDP::multi4d< T >::multi4d ( int ns4,
int ns3,
int ns2,
int ns1 )
inlineexplicit

Definition at line 836 of file qdp_multi.h.

References resize().

◆ ~multi4d()

template<class T>
QDP::multi4d< T >::~multi4d ( )
inline

Definition at line 837 of file qdp_multi.h.

◆ multi4d() [4/4]

template<class T>
QDP::multi4d< T >::multi4d ( const multi4d< T > & s)
inline

Copy constructor.

Definition at line 840 of file qdp_multi.h.

References multi4d(), and resize().

Member Function Documentation

◆ operator()() [1/2]

template<class T>
T & QDP::multi4d< T >::operator() ( int l,
int k,
int j,
int i )
inline

Return ref to an element.

Definition at line 903 of file qdp_multi.h.

◆ operator()() [2/2]

template<class T>
const T & QDP::multi4d< T >::operator() ( int l,
int k,
int j,
int i ) const
inline

Return const ref to an element.

Definition at line 906 of file qdp_multi.h.

◆ operator=() [1/2]

template<class T>
multi4d< T > & QDP::multi4d< T >::operator= ( const multi4d< T > & s1)
inline

Equal operator uses underlying = of T.

Definition at line 875 of file qdp_multi.h.

References multi4d(), resize(), size1(), size2(), size3(), and size4().

◆ operator=() [2/2]

template<class T>
template<class T1>
multi4d< T > & QDP::multi4d< T >::operator= ( const T1 & s1)
inline

Equal operator uses underlying = of T.

Definition at line 886 of file qdp_multi.h.

References multi4d().

◆ operator[]() [1/2]

template<class T>
multi3d< T > QDP::multi4d< T >::operator[] ( int l)
inline

Return ref to an element.

Definition at line 909 of file qdp_multi.h.

◆ operator[]() [2/2]

template<class T>
const multi3d< T > QDP::multi4d< T >::operator[] ( int l) const
inline

Return const ref to an element.

Definition at line 912 of file qdp_multi.h.

◆ resize()

template<class T>
void QDP::multi4d< T >::resize ( int ns4,
int ns3,
int ns2,
int ns1 )
inline

Allocate mem for the array.

Definition at line 849 of file qdp_multi.h.

References QDP::QDP_error_exit().

Referenced by multi4d(), multi4d(), operator=(), and QDP::read().

◆ size1()

template<class T>
int QDP::multi4d< T >::size1 ( ) const
inline

Size of array.

Definition at line 869 of file qdp_multi.h.

Referenced by operator=(), QDP::read(), and QDP::write().

◆ size2()

template<class T>
int QDP::multi4d< T >::size2 ( ) const
inline

Definition at line 870 of file qdp_multi.h.

Referenced by operator=(), QDP::read(), and QDP::write().

◆ size3()

template<class T>
int QDP::multi4d< T >::size3 ( ) const
inline

Definition at line 871 of file qdp_multi.h.

Referenced by operator=(), QDP::read(), and QDP::write().

◆ size4()

template<class T>
int QDP::multi4d< T >::size4 ( ) const
inline

Definition at line 872 of file qdp_multi.h.

Referenced by operator=(), QDP::read(), and QDP::write().

◆ slice()

template<class T>
const T * QDP::multi4d< T >::slice ( int l,
int k,
int j ) const
inline

Return ref to a column slice.

Definition at line 900 of file qdp_multi.h.


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