// Set up comlink structures needed by nearest neighbor gather routines // make_lattice() must be called first void make_nn_gathers() { int i, gather_parity; if (n_gathers != 0) { printf("error: make_nn_gathers must come before any make_gather\n"); terminate(1); } gather_array_len = 8; gather_array = malloc(sizeof *gather_array * gather_array_len); if (gather_array == NULL) { printf("make_nn_gathers: node%d can't malloc gather_array\n", this_node); terminate(1); } if ((nx&1) || (ny&1) || (nz&1) || (nt&1)) gather_parity = SCRAMBLE_PARITY; else gather_parity = SWITCH_PARITY; FORALLUPDIR(i) { make_gather(neighbor_coords_special, &i, WANT_INVERSE, ALLOW_EVEN_ODD, gather_parity); } /* Sort into the order we want for nearest neighbor gathers, so you can use XUP, XDOWN, etc. as argument in calling them. */ sort_eight_gathers(0); }
void make_3n_gathers(){ int i; //#ifdef HAVE_QDP // int disp[4]={0,0,0,0}; //#endif for(i=XUP;i<=TUP;i++) { make_gather(third_neighbor,&i,WANT_INVERSE, ALLOW_EVEN_ODD,SWITCH_PARITY); } /* Sort into the order we want for nearest neighbor gathers, so you can use X3UP, X3DOWN, etc. as argument in calling them. */ sort_eight_gathers(X3UP); //#ifdef HAVE_QDP // for(i=0; i<4; i++) { // disp[i] = 3; // neighbor3[i] = QDP_create_shift(disp); // disp[i] = 0; // } //#endif }