Previous: Libraries, Up: Compilation with QDP


2.3 Nonuniform color and precision

Users wishing to vary color and precision within a single calculation must use specific type names and function names whenever these types and names differ from the prevailing precision and color. If using different colors that the specified value then one must also include the necessary headers. For example, if a single precision SU(3) calculation also uses some SU(2) datatypes or operations, the following preamble is appropriate:

     #define QDP_Precision 'F'
     #define QDP_Nc 3
     #include <qdp.h>
     #include <qdp_f2.h>

and the following linkage to get the corresponding libraries:

-lqdp_f2 -lqdp_f3 -lqdp_f -lqdp_int -lqdp_common

Note that the single, double and conversion headers for the prevailing color are automatically included through qdp.h. Only when mixing colors does one need to specify individual headers.

The following table lists all the QDP headers.


Name Purpose


qdp.h Master header and QDP utilities
qdp_int.h integers, boolean
qdp_f.h real, complex, single precision
qdp_d.h real, complex, double precision
qdp_df.h real, complex, precision conversion
qdp_f2.h SU(2), single precision
qdp_d2.h SU(2), double precision
qdp_df2.h SU(2), precision conversion
qdp_f3.h SU(3), single precision
qdp_d3.h SU(3), double precision
qdp_df3.h SU(3), precision conversion
qdp_fn.h SU(N), single precision
qdp_dn.h SU(N), double precision
qdp_dfn.h SU(N), precision conversion