void packD(Layout *l, real *x, QDP_DiracFermion *yy) { QDP_Lattice *lat = QDP_get_lattice_D(yy); real *y = QDP_expose_D(yy); fromQDP_F(x, l, y, lat, 24, 3); QDP_reset_D(yy); }
void unpackD(Layout *l, QDP_DiracFermion *xx, real *y) { QDP_Lattice *lat = QDP_get_lattice_D(xx); real *x = QDP_expose_D(xx); toQDP_F(x, lat, y, l, 24, 3); QDP_reset_D(xx); }
static void f_writer(const int pos[4], int c, int d, int re_im, double v, void *env) { int n = QDP_node_number(pos); int i = QDP_index(pos); QDP_DiracFermion *f = (QDP_DiracFermion *)env; QLA_DiracFermion *df = QDP_expose_D(f); assert(n == self); if (re_im == 0) { QLA_real(QLA_elem_D(df[i], c, d)) = v; } else { QLA_imag(QLA_elem_D(df[i], c, d)) = v; } QDP_reset_D(f); }
static double f_reader(const int pos[NDIM], int c, int d, int re_im, void *env) { QLA_Real xx; int n = QDP_node_number(pos); int i = QDP_index(pos); QDP_DiracFermion *f = (QDP_DiracFermion *)env; QLA_DiracFermion *df = QDP_expose_D(f); assert(n == self); if (re_im == 0) { QLA_r_eq_Re_c(xx, QLA_elem_D(df[i], c, d)); } else { QLA_r_eq_Im_c(xx, QLA_elem_D(df[i], c, d)); } QDP_reset_D(f); return xx; }