QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex > Struct Template Reference

#include <gauge_field_order.h>

Collaboration diagram for quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >:
Collaboration graph
[legend]

Public Member Functions

 FieldOrder (GaugeField &U, void *gauge_=0, void **ghost_=0)
 
 FieldOrder (const FieldOrder &o)
 
void resetScale (double max)
 
__device__ __host__ complex< Float > operator() (int d, int parity, int x, int row, int col) const
 
__device__ __host__ fieldorder_wrapper< Float, storeFloat > operator() (int d, int parity, int x, int row, int col)
 
__device__ __host__ complex< Float > Ghost (int d, int parity, int x, int row, int col) const
 
__device__ __host__ fieldorder_wrapper< Float, storeFloat > 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__ fieldorder_wrapper< Float, storeFloat > operator() (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col)
 
__device__ __host__ complex< Float > Ghost (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col) const
 
__device__ __host__ fieldorder_wrapper< Float, storeFloat > Ghost (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col)
 
template<typename theirFloat >
__device__ __host__ void atomicAdd (int d, int parity, int x, int s_row, int s_col, int c_row, int c_col, const complex< theirFloat > &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 norm1 (int dim=-1, bool global=true) const
 Returns the L1 norm of the field in a given dimension. More...
 
__host__ double norm2 (int dim=-1, bool global=true) const
 Returns the L2 norm squared of the field in a given dimension. More...
 
__host__ double abs_max (int dim=-1, bool global=true) const
 Returns the Linfinity norm of the field in a given dimension. More...
 
__host__ double abs_min (int dim=-1, bool global=true) const
 Returns the minimum absolute value of the field. More...
 
size_t Bytes () const
 

Static Public Member Functions

static constexpr bool fixedPoint ()
 

Public Attributes

const int volumeCB
 
const int nDim
 
const int_fastdiv geometry
 
const QudaFieldLocation location
 
Accessor< Float, nColor, order, storeFloat, use_tex > accessor
 
GhostAccessor< Float, nColor, order, native_ghost, storeFloat, use_tex > 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, typename storeFloat = Float, bool use_tex = false>
struct quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >

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.

Template Parameters
FloatUnderlying type returned by the accessors
nColorNumber of colors for the field
nSpinCoarseNumber of "spin degrees of freedom" (for coarse-link fields only)
orderStorage order of the field
native_ghostWhether to use native ghosts (inlined into the padded area for internal-order fields or use a separate array if false)

Definition at line 896 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, typename storeFloat = Float, bool use_tex = false>
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 912 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, typename storeFloat = Float, bool use_tex = false>
quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::FieldOrder ( const FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex > &  o)
inline

Definition at line 921 of file gauge_field_order.h.

Member Function Documentation

◆ abs_max()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__host__ double quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::abs_max ( int  dim = -1,
bool  global = true 
) const
inline

Returns the Linfinity norm of the field in a given dimension.

Parameters
[in]dimWhich dimension we are taking the norm of (dim=-1 mean all dimensions)
Returns
Linfinity norm

Definition at line 1093 of file gauge_field_order.h.

References comm_allreduce_max(), and quda::gauge_wrapper< Float, T >::dim.

Here is the call graph for this function:

◆ abs_min()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__host__ double quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::abs_min ( int  dim = -1,
bool  global = true 
) const
inline

Returns the minimum absolute value of the field.

Parameters
[in]dimWhich dimension we are taking the norm of (dim=-1 mean all dimensions)
Returns
Minimum norm

Definition at line 1105 of file gauge_field_order.h.

References comm_allreduce_min(), and quda::gauge_wrapper< Float, T >::dim.

Here is the call graph for this function:

◆ atomicAdd()

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

Definition at line 1038 of file gauge_field_order.h.

◆ Bytes()

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

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

Definition at line 1113 of file gauge_field_order.h.

References volumeCB.

◆ fixedPoint()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
static constexpr bool quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::fixedPoint ( )
inlinestatic

Definition at line 931 of file gauge_field_order.h.

◆ Geometry()

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

Returns the field geometry

Definition at line 1056 of file gauge_field_order.h.

◆ Ghost() [1/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ complex<Float> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 963 of file gauge_field_order.h.

◆ Ghost() [2/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ fieldorder_wrapper<Float,storeFloat> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 974 of file gauge_field_order.h.

◆ Ghost() [3/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ complex<Float> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 1017 of file gauge_field_order.h.

◆ Ghost() [4/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ fieldorder_wrapper<Float,storeFloat> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 1033 of file gauge_field_order.h.

◆ Ncolor()

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

Returns the number of field colors

Definition at line 1044 of file gauge_field_order.h.

References nColor.

◆ NcolorCoarse()

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

Returns the number of coarse gauge field colors

Definition at line 1062 of file gauge_field_order.h.

◆ Ndim()

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

Returns the field geometric dimension

Definition at line 1053 of file gauge_field_order.h.

◆ norm1()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__host__ double quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::norm1 ( int  dim = -1,
bool  global = true 
) const
inline

Returns the L1 norm of the field in a given dimension.

Parameters
[in]dimWhich dimension we are taking the norm of (dim=-1 mean all dimensions)
Returns
L1 norm

Definition at line 1069 of file gauge_field_order.h.

References comm_allreduce(), and quda::gauge_wrapper< Float, T >::dim.

Here is the call graph for this function:

◆ norm2()

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

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

Parameters
[in]dimWhich dimension we are taking the norm of (dim=-1 mean all dimensions)
Returns
L2 norm squared

Definition at line 1081 of file gauge_field_order.h.

References comm_allreduce(), and quda::gauge_wrapper< Float, T >::dim.

Here is the call graph for this function:

◆ NspinCoarse()

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

Returns the number of coarse gauge field spins

Definition at line 1059 of file gauge_field_order.h.

◆ operator()() [1/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ complex<Float> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 941 of file gauge_field_order.h.

◆ operator()() [2/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ fieldorder_wrapper<Float,storeFloat> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 952 of file gauge_field_order.h.

◆ operator()() [3/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ const complex<Float> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 987 of file gauge_field_order.h.

References quda::gauge_wrapper< Float, T >::parity.

◆ operator()() [4/4]

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
__device__ __host__ fieldorder_wrapper<Float,storeFloat> quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::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 1003 of file gauge_field_order.h.

References quda::gauge_wrapper< Float, T >::parity.

◆ resetScale()

template<typename Float , int nColor, int nSpinCoarse, QudaGaugeFieldOrder order, bool native_ghost = true, typename storeFloat = Float, bool use_tex = false>
void quda::gauge::FieldOrder< Float, nColor, nSpinCoarse, order, native_ghost, storeFloat, use_tex >::resetScale ( double  max)
inline

◆ Volume()

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

Returns the field volume

Definition at line 1047 of file gauge_field_order.h.

References volumeCB.

◆ VolumeCB()

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

Returns the field volume

Definition at line 1050 of file gauge_field_order.h.

References volumeCB.

Member Data Documentation

◆ accessor

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

Definition at line 905 of file gauge_field_order.h.

◆ geometry

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

Definition at line 901 of file gauge_field_order.h.

◆ ghostAccessor

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

Definition at line 906 of file gauge_field_order.h.

◆ location

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

Definition at line 902 of file gauge_field_order.h.

◆ nColorCoarse

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

Definition at line 903 of file gauge_field_order.h.

◆ nDim

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

Definition at line 900 of file gauge_field_order.h.

◆ volumeCB

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

An internal reference to the actual field we are accessing

Definition at line 899 of file gauge_field_order.h.


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