QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
quda::clover::FieldOrder< Float, nColor, nSpin, order > Struct Template Reference

#include <clover_field_order.h>

Collaboration diagram for quda::clover::FieldOrder< Float, nColor, nSpin, order >:
Collaboration graph
[legend]

Public Member Functions

 FieldOrder (CloverField &A, bool inverse=false)
 
CloverFieldField ()
 
__device__ __host__ const complex< Float > operator() (int parity, int x, int s_row, int s_col, int c_row, int c_col) const
 Read-only complex-member accessor function. More...
 
__device__ __host__ complex< Float > operator() (int dummy, int parity, int x, int s_row, int s_col, int c_row, int c_col) const
 Read-only complex-member accessor function. This is a special variant that is compatible with the equivalent gauge::FieldOrder accessor so these can be used interchangebly in templated code. More...
 
__device__ __host__ int Ncolor () const
 Complex-member accessor function. More...
 
__device__ __host__ int Volume () const
 
__device__ __host__ int VolumeCB () const
 
size_t Bytes () const
 
__host__ double norm1 (int dim=-1, bool global=true) const
 Returns the L1 norm of the field. More...
 
__host__ double norm2 (int dim=-1, bool global=true) const
 Returns the L2 norm suared of the field. More...
 
__host__ double abs_max (int dim=-1, bool global=true) const
 Returns the Linfinity norm of the field. More...
 
__host__ double abs_min (int dim=-1, bool global=true) const
 Returns the minimum absolute value of the field. More...
 

Protected Attributes

CloverFieldA
 
const int volumeCB
 
const Accessor< Float, nColor, nSpin, order > accessor
 
bool inverse
 
const QudaFieldLocation location
 

Detailed Description

template<typename Float, int nColor, int nSpin, QudaCloverFieldOrder order>
struct quda::clover::FieldOrder< Float, nColor, nSpin, order >

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

Definition at line 389 of file clover_field_order.h.

Constructor & Destructor Documentation

◆ FieldOrder()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
quda::clover::FieldOrder< Float, nColor, nSpin, order >::FieldOrder ( CloverField A,
bool  inverse = false 
)
inline

Constructor for the FieldOrder class

Parameters
fieldThe field that we are accessing

Definition at line 404 of file clover_field_order.h.

Member Function Documentation

◆ abs_max()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__host__ double quda::clover::FieldOrder< Float, nColor, nSpin, order >::abs_max ( int  dim = -1,
bool  global = true 
) const
inline

Returns the Linfinity norm of the field.

Parameters
[in]dimWhich dimension we are taking the Linfinity norm of (dummy for clover)
Returns
Linfinity norm

Definition at line 507 of file clover_field_order.h.

References comm_allreduce_max(), and quda::clover::Accessor< Float, nColor, nSpin, order >::transform_reduce().

Referenced by quda::norm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ abs_min()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__host__ double quda::clover::FieldOrder< Float, nColor, nSpin, order >::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 minimum abs of (dummy for clover)
Returns
Minimum norm

Definition at line 519 of file clover_field_order.h.

References comm_allreduce_min(), and quda::clover::Accessor< Float, nColor, nSpin, order >::transform_reduce().

Referenced by quda::norm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Bytes()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
size_t quda::clover::FieldOrder< Float, nColor, nSpin, order >::Bytes ( ) const
inline

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

Definition at line 472 of file clover_field_order.h.

References nColor, and volumeCB.

◆ Field()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
CloverField& quda::clover::FieldOrder< Float, nColor, nSpin, order >::Field ( )
inline

Definition at line 408 of file clover_field_order.h.

◆ Ncolor()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__device__ __host__ int quda::clover::FieldOrder< Float, nColor, nSpin, order >::Ncolor ( ) const
inline

Complex-member accessor function.

Parameters
parityParity index
x1-d site index
s_rowrow spin index
c_rowrow color index
s_colcol spin index
c_colcol color indexReturns the number of field colors

Definition at line 463 of file clover_field_order.h.

References nColor.

◆ norm1()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__host__ double quda::clover::FieldOrder< Float, nColor, nSpin, order >::norm1 ( int  dim = -1,
bool  global = true 
) const
inline

Returns the L1 norm of the field.

Parameters
[in]dimWhich dimension we are taking the norm of (dummy for clover)
Returns
L1 norm

Definition at line 483 of file clover_field_order.h.

References comm_allreduce(), and quda::clover::Accessor< Float, nColor, nSpin, order >::transform_reduce().

Referenced by quda::norm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ norm2()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__host__ double quda::clover::FieldOrder< Float, nColor, nSpin, order >::norm2 ( int  dim = -1,
bool  global = true 
) const
inline

Returns the L2 norm suared of the field.

Parameters
[in]dimWhich dimension we are taking the norm of (dummy for clover)
Returns
L1 norm

Definition at line 495 of file clover_field_order.h.

References comm_allreduce(), and quda::clover::Accessor< Float, nColor, nSpin, order >::transform_reduce().

Referenced by quda::norm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()() [1/2]

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__device__ __host__ const complex<Float> quda::clover::FieldOrder< Float, nColor, nSpin, order >::operator() ( int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
) const
inline

Read-only complex-member accessor function.

Parameters
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 420 of file clover_field_order.h.

◆ operator()() [2/2]

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__device__ __host__ complex<Float> quda::clover::FieldOrder< Float, nColor, nSpin, order >::operator() ( int  dummy,
int  parity,
int  x,
int  s_row,
int  s_col,
int  c_row,
int  c_col 
) const
inline

Read-only complex-member accessor function. This is a special variant that is compatible with the equivalent gauge::FieldOrder accessor so these can be used interchangebly in templated code.

Parameters
dummyDummy parameter that is ignored
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 439 of file clover_field_order.h.

◆ Volume()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__device__ __host__ int quda::clover::FieldOrder< Float, nColor, nSpin, order >::Volume ( ) const
inline

Returns the field volume

Definition at line 466 of file clover_field_order.h.

References volumeCB.

◆ VolumeCB()

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
__device__ __host__ int quda::clover::FieldOrder< Float, nColor, nSpin, order >::VolumeCB ( ) const
inline

Returns the field volume

Definition at line 469 of file clover_field_order.h.

References volumeCB.

Member Data Documentation

◆ A

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
CloverField& quda::clover::FieldOrder< Float, nColor, nSpin, order >::A
protected

An internal reference to the actual field we are accessing

Definition at line 393 of file clover_field_order.h.

◆ accessor

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
const Accessor<Float,nColor,nSpin,order> quda::clover::FieldOrder< Float, nColor, nSpin, order >::accessor
protected

Definition at line 395 of file clover_field_order.h.

◆ inverse

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
bool quda::clover::FieldOrder< Float, nColor, nSpin, order >::inverse
protected

Definition at line 396 of file clover_field_order.h.

◆ location

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
const QudaFieldLocation quda::clover::FieldOrder< Float, nColor, nSpin, order >::location
protected

Definition at line 397 of file clover_field_order.h.

◆ volumeCB

template<typename Float , int nColor, int nSpin, QudaCloverFieldOrder order>
const int quda::clover::FieldOrder< Float, nColor, nSpin, order >::volumeCB
protected

Definition at line 394 of file clover_field_order.h.


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