Up: Function Details


5.4 Type conversion and component extraction and insertion

Convert float to double

Syntax QDP_T_eq_T(Type *r, Type *a, subset);


Meaning r = a


Type R, C, V, H, D, M, P

Convert double to float

Syntax QDP_T_eq_T(Type *r, Type *a, subset);


Meaning r = a


Type R, C, V, H, D, M, P

Convert real to complex (zero imaginary part)

Syntax QDP_C_eq_R(QDP_Complex *r, QDP_Real *a, subset);


Meaning r = a + i0

Convert real and imaginary to complex

Syntax QDP_C_eq_R_plus_i_R(QDP_Complex *r, QDP_Real *a, QDP_Real *b, subset);


Meaning r = a + i b

Real/Imaginary part of complex

Syntax QDP_R_eq_func_C(QDP_Real *r, QDP_Complex *a, subset);


Meaning r = func(a)


func re, im

Integer to real

Syntax QDP_R_eq_I(QDP_Real *r, QDP_Int *a, subset);


Meaning r = a

Real to integer (truncate/round)

Syntax QDP_I_eq_func_R(QDP_Int *r, QDP_Real *a, subset);


Meaning r = func(a)


func trunc, round

Accessing a color matrix element

Syntax QDP_C_eq_elem_M(QDP_Complex *r, QDP_ColorMatrix *a, int i, int j, subset);


Meaning r = a[i, j]

Inserting a color matrix element

Syntax QDP_M_eq_elem_C(QDP_ColorMatrix *r, QDP_Complex *a, int i, int j, subset);


Meaning r[i, j] = a

Accessing a half fermion or Dirac fermion spinor element

Syntax QDP_C_eq_elem_T(QDP_Complex *r, Type *a, int color, int spin, subset);


Meaning r = a[color, spin]


Type H, D

Inserting a half fermion or Dirac fermion spinor element

Syntax QDP_T_eq_elem_C(Type *r, QDP_Complex *a, int color, int spin, subset);


Meaning r[color, spin] = a


Type H, D

Accessing a color vector element

Syntax QDP_C_eq_elem_V(QDP_Complex *r, QDP_ColorVector *a, int i, subset);


Meaning r = a[i]

Inserting a color vector element

Syntax QDP_V_eq_elem_C(QDP_ColorVector *r, QDP_Complex *a, int i, subset);


Meaning r[i] = a

Accessing a Dirac propagator matrix element

Syntax QDP_C_eq_elem_P(QDP_Complex *r, QDP_DiracPropagator *a, int ic, int is, int jc, int js, subset);


Meaning r = a[ic, is, jc, js]

Inserting a Dirac propagator matrix element

Syntax QDP_P_eq_elem_C(QDP_DiracPropagator *r, QDP_Complex *a, int ic, int is, int jc, int js, subset);


Meaning r[ic, is, jc, js] = a

Extracting a color vector from a color matrix column

Syntax QDP_V_eq_colorvec_M(QDP_ColorVector *r, QDP_ColorMatrix *a, int j, subset);


Meaning r[i] = a[i, j] (for all i)

Inserting a color vector into a color matrix column

Syntax QDP_M_eq_colorvec_V(QDP_ColorMatrix *r, QDP_ColorVector *a, int j, subset);


Meaning r[i, j] = a[i] (for all i)

Extracting a color vector from a half fermion or Dirac fermion

Syntax QDP_V_eq_colorvec_T(QDP_ColorVector *r, Type *a, int spin, subset);


Meaning r[color] = a[color, spin] (for all color)


Type H, D

Inserting a color vector into a half fermion or Dirac fermion

Syntax QDP_T_eq_colorvec_V(Type *r, QDP_ColorVector *a, int spin, subset);


Meaning r[color, spin] = a[color] (for all color)


Type H, D

Extracting a Dirac vector from a Dirac propagator matrix column

Syntax QDP_D_eq_diracvec_P(QDP_DiracFermion *r, QDP_DiracPropagator *a, int jc, int js, subset);


Meaning r[ic, is] = a[ic, is, jc, js] (for all ic, is)

Inserting a Dirac vector into a Dirac propagator matrix column

Syntax QDP_P_eq_diracvec_D(QDP_DiracPropagator *r, QDP_DiracFermion *a, int jc, int js, subset);


Meaning r[ic, is, jc, js] = a[ic, is] (for all ic, is)

Trace of color matrix

Syntax QDP_C_eq_trace_M(QDP_Complex *r, QDP_ColorMatrix *a, subset);


Meaning r = trace(a)

Real/Imaginary part of trace of color matrix

Syntax QDP_R_eq_func_M(QDP_Real *r, QDP_ColorMatrix *a, subset);


Meaning r = func(a)


func re_trace, im_trace

Traceless antihermitian part of color matrix

Syntax QDP_M_eq_antiherm_M(QDP_ColorMatrix *r, QDP_ColorMatrix *a, subset);


Meaning r = (a - a^dagger)/2 - i Im Tr a/n_c

Spin trace of Dirac propagator

Syntax QDP_M_eq_spintrace_P(QDP_ColorMatrix *r, QDP_DiracPropagator *a, subset);


Meaning r[ic, jc] = Sum_is a[ic, is, jc, is]

Dirac spin projection

Syntax QDP_H_eqop_spproj_D(QDP_HalfFermion *r, QDP_DiracFermion *a, int dir, int sign, subset);
QDP_H_veqop_spproj_D(QDP_HalfFermion *r[], QDP_DiracFermion *a[], int dir[], int sign[], subset, int n);


Meaning r = spin project(a, dir, sign)


eqop eq, peq, meq, eqm

Dirac spin reconstruction

Syntax QDP_D_eqop_sprecon_H(QDP_DiracFermion *r, QDP_HalfFermion *a, int dir, int sign, subset);
QDP_D_veqop_sprecon_H(QDP_DiracFermion *r[], QDP_HalfFermion *a[], int dir[], int sign[], subset, int n);


Meaning r = spin reconstruct(a, dir, sign)


eqop eq, peq, meq, eqm

Dirac spin projection with reconstruction

Syntax QDP_D_eqop_spproj_D(QDP_DiracFermion *r, QDP_DiracFermion *a, int dir, int sign, subset);
QDP_D_veqop_spproj_D(QDP_DiracFermion *r[], QDP_DiracFermion *a[], int dir[], int sign[], subset, int n);


Meaning r = spin reconstruct(spin project(a, dir, sign), dir, sign)


eqop eq, peq, meq, eqm

Matrix multiply and Dirac spin projection

Syntax QDP_H_eqop_M{a}_times_D(QDP_HalfFermion *r, QDP_ColorMatrix *a, QDP_DiracFermion *b, int dir, int sign, subset);
QDP_H_veqop_M{a}_times_D(QDP_HalfFermion *r[], QDP_ColorMatrix *a[], QDP_DiracFermion *b[], int dir[], int sign[], subset, int n);


Meaning r = spin project(a*b, dir, sign)


eqop eq_spproj, peq_spproj, meq_spproj, eqm_spproj

Matrix multiply and Dirac spin reconstruction

Syntax QDP_D_eqop_M{a}_times_H(QDP_DiracFermion *r, QDP_ColorMatrix *a, QDP_HalfFermion *b, int dir, int sign, subset);
QDP_D_veqop_M{a}_times_H(QDP_DiracFermion *r[], QDP_ColorMatrix *a[], QDP_HalfFermion *b[], int dir[], int sign[], subset, int n);


Meaning r = spin reconstruct(a*b, dir, sign)


eqop eq_sprecon, peq_sprecon, meq_sprecon, eqm_sprecon

Matrix multiply and Dirac spin projection with reconstruction

Syntax QDP_D_eqop_M{a}_times_D(QDP_DiracFermion *r, QDP_ColorMatrix *a, QDP_DiracFermion *b, int dir, int sign, subset);
QDP_D_veqop_M{a}_times_D(QDP_DiracFermion *r[], QDP_ColorMatrix *a[], QDP_DiracFermion *b[], int dir[], int sign[], subset, int n);


Meaning r = spin reconstruct(spin project(a*b, dir, sign), dir, sign)


eqop eq_spproj, peq_spproj, meq_spproj, eqm_spproj