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

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

#include <qdp_multi.h>

Public Member Functions

 multi3d ()
 multi3d (T *f, int ns3, int ns2, int ns1)
 multi3d (int ns3, int ns2, int ns1)
 ~multi3d ()
 multi3d (const multi3d &s)
 Copy constructor.
void resize (int ns3, int ns2, int ns1)
 Allocate mem for the array.
int size1 () const
 Size of array.
int size2 () const
int size3 () const
int leftSize () const
 Another variant on the size of the 3d array.
int middleSize () const
int rightSize () const
multi3d< T > & operator= (const multi3d< T > &s1)
 Equal operator uses underlying = of T.
template<class T1>
multi3d< T > & operator= (const T1 &s1)
 Equal operator uses underlying = of T.
const T * slice (int k, int j) const
 Return ref to a column slice.
T & operator() (int k, int j, int i)
 Return ref to an element.
const T & operator() (int k, int j, int i) const
 Return const ref to an element.
multi2d< T > operator[] (int k)
 Return ref to an element.
const multi2d< T > operator[] (int k) const
 Return const ref to an element.

Detailed Description

template<class T>
class QDP::multi3d< T >

Container for a multi-dimensional 3D array.

Definition at line 732 of file qdp_multi.h.

Constructor & Destructor Documentation

◆ multi3d() [1/4]

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

Definition at line 735 of file qdp_multi.h.

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

◆ multi3d() [2/4]

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

Definition at line 736 of file qdp_multi.h.

◆ multi3d() [3/4]

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

Definition at line 737 of file qdp_multi.h.

References resize().

◆ ~multi3d()

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

Definition at line 738 of file qdp_multi.h.

◆ multi3d() [4/4]

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

Copy constructor.

Definition at line 741 of file qdp_multi.h.

References multi3d(), and resize().

Member Function Documentation

◆ leftSize()

template<class T>
int QDP::multi3d< T >::leftSize ( ) const
inline

Another variant on the size of the 3d array.

Definition at line 775 of file qdp_multi.h.

◆ middleSize()

template<class T>
int QDP::multi3d< T >::middleSize ( ) const
inline

Definition at line 776 of file qdp_multi.h.

◆ operator()() [1/2]

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

Return ref to an element.

Definition at line 808 of file qdp_multi.h.

◆ operator()() [2/2]

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

Return const ref to an element.

Definition at line 811 of file qdp_multi.h.

◆ operator=() [1/2]

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

Equal operator uses underlying = of T.

Definition at line 780 of file qdp_multi.h.

References multi3d(), resize(), size1(), size2(), and size3().

◆ operator=() [2/2]

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

Equal operator uses underlying = of T.

Definition at line 791 of file qdp_multi.h.

References multi3d().

◆ operator[]() [1/2]

template<class T>
multi2d< T > QDP::multi3d< T >::operator[] ( int k)
inline

Return ref to an element.

Definition at line 814 of file qdp_multi.h.

◆ operator[]() [2/2]

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

Return const ref to an element.

Definition at line 817 of file qdp_multi.h.

◆ resize()

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

Allocate mem for the array.

Definition at line 750 of file qdp_multi.h.

References QDP::QDP_error_exit().

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

◆ rightSize()

template<class T>
int QDP::multi3d< T >::rightSize ( ) const
inline

Definition at line 777 of file qdp_multi.h.

◆ size1()

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

Size of array.

Definition at line 770 of file qdp_multi.h.

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

◆ size2()

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

Definition at line 771 of file qdp_multi.h.

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

◆ size3()

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

Definition at line 772 of file qdp_multi.h.

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

◆ slice()

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

Return ref to a column slice.

Definition at line 805 of file qdp_multi.h.


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