Next: , Previous: Datatypes, Up: Datatypes


3.1 Generic Names

The linear algebra portion of the QDP API is designed to resemble the Level 1 QLA API. Thus the datatypes and function naming conventions are similar. As with QLA there are two levels of generic naming: fully generic in which both color and precision may be controlled globally through two macros and color-generic in which precision is explicit but not color. Generic naming applies to datatypes, module names, and accessor macros and follows similar rules.

Names for fully generic datatypes are listed in the table below.


Name Abbreviation Description


QDP_RandomState S implementation dependent
QDP_Int I integer
QDP_Real R real
QDP_Complex C complex
QDP_ColorVector V one-spin, N_c color spinor
QDP_HalfFermion H two-spin, N_c color spinor
QDP_DiracFermion D four-spin, N_c color spinor
QDP_ColorMatrix M N_c \times N_c complex matrix
QDP_DiracPropagator P 4 N_c \times 4 N_c complex matrix

The name for the corresponding primitive type, also known as the QLA type, is obtained by replacing the QDP prefix with a QLA prefix. Thus QLA_ColorMatrix is the primitive (QLA) type associated with the field QDP_ColorMatrix.

Names for color-generic datatypes are obtained by inserting _F for single precision or _D for double precision after QDP where appropriate. Thus QDP_D_ColorMatrix specifies a double precision color matrix with color to be set through a global macro.

A long double precision type with abbreviation Q is defined for QLA, but currently not for QDP.