From detar@dirac.physics.utah.edu Wed Jul 24 18:11:10 2002 Date: Wed, 24 Jul 2002 16:11:04 -0600 (MDT) From: Carleton DeTar To: cmendes@cs.uiuc.edu, djholm@fnal.gov, edwards@jlab.org, watson@jlab.org, rdm@phys.columbia.edu, brower@ctpup.mit.edu, avp@lns.mit.edu, simone@fnal.gov, sg@fuji.physics.indiana.edu, osborn@physics.utah.edu, doug@klingon.physics.arizona.edu, gregory@physics.arizona.edu, mackenzie@fnal.gov CC: detar@physics.utah.edu Subject: Proposed QLA naming and functionality X-IMAPbase: 1208658961 0000000001 X-UID: 1 Status: O Content-Length: 4570 Hi Folks, I was asked to propose a naming convention and indirect index functionality for QLA routines for discussion in tomorrow's conference call. James and my suggestions are attached. We also tried to deal with the question of defining Nc. Our intention is to make it possible to change the number of colors by essentially changing the value of one macro. The QLA libraries would handle Nc = 2, 3, or N where N is any other integer. For the moment we thought to hard-wire the number of spins to Ns = 4. Regards, Carleton ---------------------------------------------------------------------- Generic names and abbreviations Nc = variable and Ns = 4 (fixed) R LatticeReal C LatticeComplex I LatticeInt G LatticeGauge H LatticeHalfFermion D LatticeDiracFermion V LatticeStaggeredFermion P LatticeDiracPropagator M LatticeStaggeredPropagator Prefixes to abbreviations (use lower case) s = shift Suffixes to abbreviations (use lower case) a = adjoint Scalar names - in QDP usage only. For QLA, use caps. r Real c Complex i Int g Gauge h HalfFermion d DiracFermion v StaggeredFermion p DiracPropagator m StaggeredPropagator ---------------------------------------------------------------------- Precision-specific names (colorless) T LatticeTypeR where R = D or F for precision and T = R, C for Type = Real, Complex Total of 4 data types Color- and precision-specific names T LatticeTypeRn where R = D or F for precision and T = G, H, D, V, P, M for Type = Gauge, HalfFermion, DiracFermion, StaggeredFermion, DiracPropagator StaggeredPropagator and n = 2, 3, or N Total of 36 data types Counting Int, we have a total of 9 generic and 41 specific data types for the lattice fields and an equal number of scalar data types. The generic types are typdef'ed to the specific types at compile time, based on the values of two macros, PRECISION and Nc. The QLA libraries come in 6 variants, depending on the number of colors and the precision. The generic function names given below are similarly typedef'ed to color- and precision-specific function names. However, if we use functions instead of macros, the color-specific prototypes would require the color-specific data types, so strong type checking is enforced. In this way it should be possible to change the number of colors essentially by changing the macro Nc. ---------------------------------------------------------------------- QLA naming conventions e.g. binary operation c = a op b (1) single site (Generic name shown only for this case. Most programmers will use the generic name, which is then typdef'ed to the specific name at compile time.) generic QLA_T3_eq_T1_op_T2(c,a,b) specific QLA_Rn_T3_eq_T1_op_T2(c,a,b) for n = 2, 3 (when color matters) specific QLA_RN_T3_eq_T1_op_T2(nc,c,a,b) for general color number nc (We always put the number of colors as the first argument in this case. For brevity, we omit this variant in what follows. Here R = D or F Note that the precision and color is fixed throughout the operation. (2) vector QLA_Rn_T3_veq_T1_op_T2(c,a,b,n) c[i] = a[i] op b[i] for i = 1...n (3) gang-indexing QLA_Rn_T3_xeq_T1_op_T2(c,a,b,index,n) c[index[i]] = a[index[i]] op b[index[i]] for i = 1...n (4) separate indexing [7 more besides (2)] for example QLA_Rn_xT3_eq_xT1_op_T2(c,indexc,a,indexa,b,n) c[indexc[i]] = a[indexa[i]] op b[i] (5) pointers - MILC wants pointers only for rhs operands. Also wants indexing together with pointers. (Indexing is to be used in implementing subsets. Pointers for implementing shifts. Since subsets are applied to the entire operation, gang-indexing is all we need.) (2') vector QLA_Rn_T3_veq_pT1_op_T2(c,a,b,n) c[i] = (*a[i]) op b[i] for i = 1...n QLA_Rn_T3_veq_T1_op_T2(c,a,b,n) c[i] = a[i] op (*b[i]) for i = 1...n QLA_Rn_T3_veq_pT1_op_pT2(c,a,b,n) c[i] = (*a[i]) op (*b[i]) for i = 1...n (3') gang-indexed QLA_Rn_T3_xeq_pT1_op_T2(c,a,b,index,n) c[index[i]] = (*a[index[i]]) op b[index[i]] for i = 1...n QLA_Rn_T3_xeq_T1_op_pT2(c,a,b,index,n) c[index[i]] = a[index[i]] op (*b[index[i]]) for i = 1...n QLA_Rn_T3_xeq_pT1_op_pT2(c,a,b,index,n) c[index[i]] = (*a[index[i]]) op (*b[index[i]]) for i = 1...n Without pointers there are 10 variants. With these pointers there are 16. ----------------------------------------------------------------------