Previous: Shift, Up: Naming Conventions for Data Parallel Functions
Some of the routines can operate on multiple fields at a time.
These functions are designated by placing a v
in front of the
eqop operator. The allowed eqop's are then
veq
, vpeq
, vmeq
and veqm
.
All arguments to the function are then made into arrays of the type
the original argument was except for the subset.
Even scalar values (QLA types) and other parameters are turned into arrays.
The length of the arrays is then given as the last argument.
For example the function
QDP_F3_V_peq_M_times_V(QDP_F3_ColorVector *r, QDP_F3_ColorMatrix *a,
QDP_F3_ColorVector *b, QDP_Subset s );
becomes
QDP_F3_V_vpeq_M_times_V(QDP_F3_ColorVector *r[], QDP_F3_ColorMatrix *a[],
QDP_F3_ColorVector *b[], QDP_Subset s, int n );
This has the same effect as the following code
for(i=0; i<n; i++)
QDP_F3_V_peq_M_times_V( r[i], a[i], b[i], s );
however it may be implemented in a more efficient manner
(see Optimization Calls).
It is permissible to have multiple array elements point to the same field.
The result will always agree with that of the above for
loop.