Next: , Previous: Layout utilities, Up: QDP Functions


4.3 Naming Conventions for Data Parallel Functions

Data parallel functions are described in detail in Function Details. Here we desribe the naming conventions. Data parallel function names are constructed with a pattern that suggests their functionality. Thus the function

QDP_V_eq_M_times_V(c, u, b, s);

carries out the product

c[x] = u[x]*b[x];

for all lattice coordinates x belonging to the subset s. where c and b are pointers to lattice staggered fermion vector fields and u is a pointer to a lattice color matrix field. The elements of the function name are separated by an underscore (_) for readability. All function names in this interface begin with QDP. The specific name continues with a precision and color label as in QDP_F3_V_eq_M_times_V for single precision SU(3). Then comes a string of elements that mimics the algebraic expression. The next character V abbreviates the type for the destination operand, in this case the argument c. The abbreviations are listed in Datatypes. The next string eq specifies the assignment operator. In this case it is a straight replacement, but modifications are also supported, as described below. Then comes the first rhs operand type M followed by a string times specifying the operation and a character V specifying the second rhs operand type.

Supported variants of the assignment operator are tabulated below.


Abbreviation Meaning


eq =
peq +=
meq -=
eqm =-

Some functions allow all of these and some take only a simple replacement (eq).