QUDA  0.9.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost > Struct Template Reference

#include <gauge_field_order.h>

Public Member Functions

 FieldOrder (GaugeField &U, void *gauge_=0, void **ghost_=0)
 
 FieldOrder (const FieldOrder &o)
 
virtual ~FieldOrder ()
 
__device__ __host__ const complex< Float > & operator() (int d, int parity, int x, int row, int col) const
 
__device__ __host__ complex< Float > & operator() (int d, int parity, int x, int row, int col)
 
__device__ __host__ const complex< Float > & Ghost (int d, int parity, int x, int row, int col) const
 
__device__ __host__ complex< Float > & Ghost (int d, int parity, int x, int row, int col)
 
__device__ __host__ const complex< Float > & operator() (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col) const
 
__device__ __host__ complex< Float > & operator() (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col)
 
__device__ __host__ const complex< Float > & Ghost (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col) const
 
__device__ __host__ complex< Float > & Ghost (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col)
 
__device__ __host__ void atomicAdd (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col, complex< Float > &val)
 
__device__ __host__ int Ncolor () const
 
__device__ __host__ int Volume () const
 
__device__ __host__ int VolumeCB () const
 
__device__ __host__ int Ndim () const
 
__device__ __host__ int Geometry () const
 
__device__ __host__ int NspinCoarse () const
 
__device__ __host__ int NcolorCoarse () const
 
__host__ double norm2 (int dim) const
 Returns the L2 norm squared of the field in a given dimension. More...
 
size_t Bytes () const
 

Public Attributes

const int volumeCB
 
const int nDim
 
const int geometry
 
QudaFieldLocation location
 
const Accessor< Float, nColor, order > accessor
 
const GhostAccessor< Float, nColor, order, native_ghost > ghostAccessor
 

Static Public Attributes

static constexpr int nColorCoarse = nColor / nSpinCoarse
 

Detailed Description

template<typename Float, int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
struct quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >

This is a template driven generic gauge field accessor. To deploy for a specifc field ordering, the two operator() accessors have to be specialized for that ordering.

Definition at line 380 of file gauge_field_order.h.

Constructor & Destructor Documentation

◆ FieldOrder() [1/2]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::FieldOrder ( GaugeField U,
void *  gauge_ = 0,
void **  ghost_ = 0 
)
inline

Constructor for the FieldOrder class

Parameters
fieldThe field that we are accessing

Definition at line 397 of file gauge_field_order.h.

References errorQuda, QUDA_RECONSTRUCT_NO, and quda::GaugeField::Reconstruct().

Here is the call graph for this function:

◆ FieldOrder() [2/2]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::FieldOrder ( const FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost > &  o)
inline

Definition at line 406 of file gauge_field_order.h.

◆ ~FieldOrder()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
virtual quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::~FieldOrder ( )
inlinevirtual

Definition at line 411 of file gauge_field_order.h.

Member Function Documentation

◆ atomicAdd()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ void quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::atomicAdd ( int  d,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col,
complex< Float > &  val 
)
inline

◆ Bytes()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
size_t quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Bytes ( ) const
inline

Return the size of the allocation (geometry and parity left out and added as needed in Tunable::bytes)

Definition at line 567 of file gauge_field_order.h.

References nColor, and quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::volumeCB.

◆ Geometry()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Geometry ( ) const
inline

Returns the field geometry

Definition at line 535 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::geometry.

◆ Ghost() [1/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ const complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost ( int  d,
int  parity,
int  x,
int  row,
int  col 
) const
inline

Read-only complex-member accessor function for the ghost zone

Parameters
ddimension index
parityParity index
x1-d site index
rowrow index
ccolumn index

Definition at line 443 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::ghostAccessor, parity, and x.

Referenced by quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost().

Here is the caller graph for this function:

◆ Ghost() [2/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost ( int  d,
int  parity,
int  x,
int  row,
int  col 
)
inline

Writable complex-member accessor function for the ghost zone

Parameters
ddimension index
parityParity index
x1-d site index
rowrow index
ccolumn index

Definition at line 454 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::ghostAccessor, parity, and x.

◆ Ghost() [3/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ const complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost ( int  d,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
) const
inline

Specialized read-only complex-member accessor function (for coarse gauge field ghost zone)

Parameters
ddimension index
parityParity index
x1-d site index
s_rowrow spin index
c_rowrow color index
s_colcol spin index
c_colcol color index

Definition at line 497 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost(), quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse, parity, and x.

Here is the call graph for this function:

◆ Ghost() [4/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost ( int  d,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
)
inline

Specialized read-only complex-member accessor function (for coarse gauge field ghost zone)

Parameters
ddimension index
parityParity index
x1-d site index
s_rowrow spin index
c_rowrow color index
s_colcol spin index
c_colcol color index

Definition at line 512 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ghost(), quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse, parity, and x.

Here is the call graph for this function:

◆ Ncolor()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ncolor ( ) const
inline

Returns the number of field colors

Definition at line 523 of file gauge_field_order.h.

References nColor.

◆ NcolorCoarse()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::NcolorCoarse ( ) const
inline

Returns the number of coarse gauge field colors

Definition at line 541 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse.

◆ Ndim()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Ndim ( ) const
inline

Returns the field geometric dimension

Definition at line 532 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nDim.

◆ norm2()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__host__ double quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::norm2 ( int  dim) const
inline

Returns the L2 norm squared of the field in a given dimension.

Parameters
[in]dimWhich dimension we are taking the norm of
Returns
L2 norm squared

Definition at line 548 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::accessor, comm_allreduce(), dim, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::location, nColor, quda::norm(), parity, QUDA_CUDA_FIELD_LOCATION, and quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::volumeCB.

Here is the call graph for this function:

◆ NspinCoarse()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::NspinCoarse ( ) const
inline

Returns the number of coarse gauge field spins

Definition at line 538 of file gauge_field_order.h.

◆ operator()() [1/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ const complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::operator() ( int  d,
int  parity,
int  x,
int  row,
int  col 
) const
inline

Read-only complex-member accessor function

Parameters
ddimension index
parityParity index
x1-d site index
rowrow index
ccolumn index

Definition at line 421 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::accessor, d, parity, and x.

◆ operator()() [2/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::operator() ( int  d,
int  parity,
int  x,
int  row,
int  col 
)
inline

Writable complex-member accessor function

Parameters
ddimension index
parityParity index
x1-d site index
rowrow index
ccolumn index

Definition at line 432 of file gauge_field_order.h.

References quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::accessor, d, parity, and x.

◆ operator()() [3/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ const complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::operator() ( int  d,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
) const
inline

Specialized read-only complex-member accessor function (for coarse gauge field)

Parameters
ddimension index
parityParity index
x1-d site index
s_rowrow spin index
c_rowrow color index
s_colcol spin index
c_colcol color index

Definition at line 467 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse, parity, and x.

◆ operator()() [4/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ complex<Float>& quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::operator() ( int  d,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
)
inline

Specialized read-only complex-member accessor function (for coarse gauge field)

Parameters
ddimension index
parityParity index
x1-d site index
s_rowrow spin index
c_rowrow color index
s_colcol spin index
c_colcol color index

Definition at line 482 of file gauge_field_order.h.

References d, quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse, parity, and x.

◆ Volume()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::Volume ( ) const
inline

◆ VolumeCB()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
__device__ __host__ int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::VolumeCB ( ) const
inline

Member Data Documentation

◆ accessor

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
const Accessor<Float,nColor,order> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::accessor

◆ geometry

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
const int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::geometry

◆ ghostAccessor

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
const GhostAccessor<Float,nColor,order,native_ghost> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::ghostAccessor

◆ location

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
QudaFieldLocation quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::location

◆ nColorCoarse

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
constexpr int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nColorCoarse = nColor / nSpinCoarse
static

◆ nDim

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
const int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::nDim

◆ volumeCB

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true>
const int quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost >::volumeCB

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