Generic header and macros

As described above, normally the user selects a prevailing color and precision for the entire calculation. In that case it is permissible to use the generic function names and datatypes, making it possible to change colors and precision with a simple recompilation, if desired. For this purpose the generic header file is qla.h. The following macros must be defined by the user prior to including this header file:

required macro choices
QLA_Precision 'F','D'
QLA_Colors 2, 3, 'N'
QLA_Nc nc if QLA_Colors= 'N'
Single quotes are required around nonnumeric values.

A sample code preamble for double precision SU(3) reads

#define QLA_Precision 'D'
#define QLA_Colors 3
#include <qla.h>
with the include search path set to $QLA_HOME/include and $QLA_HOME set to the home directory for QLA. With such a preamble the generic function names and datatypes are automatically mapped to the requested specific types. Of course the precision and color macros can also be defined through a compiler flag, as in
gcc  -DQLA_Precision=\'D\' -DQLA_Colors=3 ...
The single quotes are required and they must each be preceded by a backslash
to keep them from being eaten by the shell.

For SU(4) one might do

#define QLA_Precision 'F'
#define QLA_Colors 'N'
#define QLA_Nc 4
#include <qla.h>
In the current implementation the maximum number of colors is 5, specified by the macro
  QLA_MAX_Nc
defined in the auxiliary header qla_types.h. Changing it is trivial, but requires recompiling the libraries (but not rebuilding the source code).

James Osborn 2006-06-25