18 #if defined USE_GROUP_SU3
20 #elif defined USE_GROUP_SU2
22 #elif defined USE_GROUP_SU_N
29 #ifdef USE_FACTORY_AUTOREGISTER
31 bool init = Fopr_Wilson_eo::register_factory();
59 vout.
crucial(
"Error at %s: unsupported gamma-matrix type: %s\n",
117 if ((
m_Nx % 2) != 0) {
124 if ((
m_Ny % 2) != 0) {
137 for (
int it = 0; it <
m_Nt; ++it) {
138 for (
int iz = 0; iz <
m_Nz; ++iz) {
139 for (
int iy = 0; iy <
m_Ny; ++iy) {
144 = (iy_global + iz_global + it_global) % 2;
241 const std::vector<int> bc)
243 assert(bc.size() ==
m_Ndim);
251 for (
int idir = 0; idir <
m_Ndim; ++idir) {
264 for (
int mu = 0; mu <
m_Ndim; ++mu) {
323 if (ith == 0)
m_mode = mode;
333 }
else if (
m_mode ==
"Ddag") {
335 }
else if (
m_mode ==
"DdagD") {
337 }
else if (
m_mode ==
"DDdag") {
340 vout.
crucial(
"Error at %s: irrelevant mult mode = %s.\n",
352 }
else if (
m_mode ==
"Ddag") {
354 }
else if (
m_mode ==
"DdagD") {
356 }
else if (
m_mode ==
"DDdag") {
359 vout.
crucial(
"Error at %s: irrelevant mult mode = %s.\n",
368 const std::string mode)
372 }
else if (mode ==
"Doe") {
375 vout.
crucial(
"Error at %s: irrelevant mult mode = %s.\n",
384 const std::string mode)
388 }
else if (mode ==
"Doe") {
391 vout.
crucial(
"Error at %s: irrelevant mult mode = %s.\n",
455 assert(w.
nex() == 1);
568 double *vp = v.
ptr(0);
569 const double *wp = w.
ptr(0);
571 int ith, nth, is, ns;
572 set_threadtask(ith, nth, is, ns,
m_Nvol2);
578 for (
int site = is; site < ns; ++site) {
579 mult_gamma5_dirac(&vp[Nvcd * site], &wp[Nvcd * site],
m_Nc);
589 double *vp = v.
ptr(0);
590 const double *wp = w.
ptr(0);
592 int ith, nth, is, ns;
593 set_threadtask(ith, nth, is, ns,
m_Nvol2);
599 for (
int site = is; site < ns; ++site) {
600 mult_gamma5_chiral(&vp[Nvcd * site], &wp[Nvcd * site],
m_Nc);
623 int Nvc2 =
m_Nvc * 2;
628 double *vp = v.
ptr(0);
629 const double *wp = w.
ptr(0);
632 int ith, nth, is, ns;
633 set_threadtask(ith, nth, is, ns,
m_Nvol2);
637 for (
int site = is; site < ns; ++site) {
638 int ix2 = site %
m_Nx2;
639 int iyzt = site /
m_Nx2;
640 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
641 if ((ix2 == 0) && (keo == 1)) {
642 int iyzt2 = iyzt / 2;
643 int in = Nvcd * site;
644 int ib1 = Nvc2 * iyzt2;
646 double vt1[
NVC], vt2[
NVC];
647 set_sp2_xp(vt1, vt2, &wp[in],
m_Nc);
648 for (
int ivc = 0; ivc <
NVC; ++ivc) {
649 vcp1_xp[ivc + ib1] = bc2 * vt1[ivc];
650 vcp1_xp[ivc + ib2] = bc2 * vt2[ivc];
664 for (
int site = is; site < ns; ++site) {
665 int ix2 = site %
m_Nx2;
666 int iyzt = site /
m_Nx2;
667 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
668 int ix2n = ix2 + keo;
669 int nei = ix2n +
m_Nx2 * iyzt;
670 int iv = Nvcd * site;
671 int ig =
m_Ndf * site;
675 double vt1[
NVC], vt2[
NVC];
676 set_sp2_xp(vt1, vt2, &wp[in],
m_Nc);
677 for (
int ic = 0; ic <
m_Nc; ++ic) {
679 double wt1r = mult_uv_r(&up[ic2 + ig], vt1,
m_Nc);
680 double wt1i = mult_uv_i(&up[ic2 + ig], vt1,
m_Nc);
681 double wt2r = mult_uv_r(&up[ic2 + ig], vt2,
m_Nc);
682 double wt2i = mult_uv_i(&up[ic2 + ig], vt2,
m_Nc);
683 set_sp4_xp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
686 int iyzt2 = iyzt / 2;
687 int ib1 = Nvc2 * iyzt2;
689 for (
int ic = 0; ic <
m_Nc; ++ic) {
691 double wt1r = mult_uv_r(&up[ic2 + ig], &
vcp2_xp[ib1],
m_Nc);
692 double wt1i = mult_uv_i(&up[ic2 + ig], &
vcp2_xp[ib1],
m_Nc);
693 double wt2r = mult_uv_r(&up[ic2 + ig], &
vcp2_xp[ib2],
m_Nc);
694 double wt2i = mult_uv_i(&up[ic2 + ig], &
vcp2_xp[ib2],
m_Nc);
695 set_sp4_xp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
709 int Nvc2 =
m_Nvc * 2;
714 double *vp = v.
ptr(0);
715 const double *wp = w.
ptr(0);
718 int ith, nth, is, ns;
719 set_threadtask(ith, nth, is, ns,
m_Nvol2);
723 for (
int site = is; site < ns; ++site) {
724 int ix2 = site %
m_Nx2;
725 int iyzt = site /
m_Nx2;
726 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
727 if ((ix2 ==
m_Nx2 - 1) && (keo == 0)) {
728 int iyzt2 = iyzt / 2;
729 int in = Nvcd * site;
730 int ig =
m_Ndf * site;
731 int ib1 = Nvc2 * iyzt2;
733 double vt1[
NVC], vt2[
NVC];
734 set_sp2_xm(vt1, vt2, &wp[in],
m_Nc);
735 for (
int ic = 0; ic <
m_Nc; ++ic) {
738 int ici = 2 * ic + 1;
739 vcp1_xm[icr + ib1] = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
740 vcp1_xm[ici + ib1] = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
741 vcp1_xm[icr + ib2] = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
742 vcp1_xm[ici + ib2] = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
757 for (
int site = is; site < ns; ++site) {
758 int ix2 = site %
m_Nx2;
759 int iyzt = site /
m_Nx2;
760 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
761 int ix2n = ix2 - (1 - keo);
762 int nei = ix2n +
m_Nx2 * iyzt;
763 int iv = Nvcd * site;
766 int ig =
m_Ndf * nei;
768 double vt1[
NVC], vt2[
NVC];
769 set_sp2_xm(vt1, vt2, &wp[in],
m_Nc);
770 for (
int ic = 0; ic <
m_Nc; ++ic) {
772 double wt1r = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
773 double wt1i = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
774 double wt2r = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
775 double wt2i = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
776 set_sp4_xm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
779 int iyzt2 = iyzt / 2;
780 int ib1 = Nvc2 * iyzt2;
782 for (
int ic = 0; ic <
m_Nc; ++ic) {
783 double wt1r = bc2 *
vcp2_xm[2 * ic + ib1];
784 double wt1i = bc2 *
vcp2_xm[2 * ic + 1 + ib1];
785 double wt2r = bc2 *
vcp2_xm[2 * ic + ib2];
786 double wt2i = bc2 *
vcp2_xm[2 * ic + 1 + ib2];
787 set_sp4_xm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
801 int Nvc2 =
m_Nvc * 2;
806 double *vp = v.
ptr(0);
807 const double *wp = w.
ptr(0);
810 int ith, nth, is, ns;
811 set_threadtask(ith, nth, is, ns,
m_Nvol2);
815 for (
int site = is; site < ns; ++site) {
816 int ix = site %
m_Nx2;
817 int iyzt = site /
m_Nx2;
818 int iy = iyzt %
m_Ny;
819 int izt = iyzt /
m_Ny;
820 int ixzt = ix +
m_Nx2 * izt;
822 int in = Nvcd * site;
823 int ix1 = Nvc2 * ixzt;
825 double vt1[
NVC], vt2[
NVC];
826 set_sp2_yp(vt1, vt2, &wp[in],
m_Nc);
827 for (
int ivc = 0; ivc <
NVC; ++ivc) {
828 vcp1_yp[ivc + ix1] = bc2 * vt1[ivc];
829 vcp1_yp[ivc + ix2] = bc2 * vt2[ivc];
843 for (
int site = is; site < ns; ++site) {
844 int ix = site %
m_Nx2;
845 int iyzt = site /
m_Nx2;
846 int iy = iyzt %
m_Ny;
847 int izt = iyzt /
m_Ny;
848 int ixzt = ix +
m_Nx2 * izt;
849 int nei = ix +
m_Nx2 * (iy + 1 +
m_Ny * izt);
850 int iv = Nvcd * site;
851 int ig =
m_Ndf * site;
855 double vt1[
NVC], vt2[
NVC];
856 set_sp2_yp(vt1, vt2, &wp[in],
m_Nc);
857 for (
int ic = 0; ic <
m_Nc; ++ic) {
859 double wt1r = mult_uv_r(&up[ic2 + ig], vt1,
m_Nc);
860 double wt1i = mult_uv_i(&up[ic2 + ig], vt1,
m_Nc);
861 double wt2r = mult_uv_r(&up[ic2 + ig], vt2,
m_Nc);
862 double wt2i = mult_uv_i(&up[ic2 + ig], vt2,
m_Nc);
863 set_sp4_yp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
866 int ix1 = Nvc2 * ixzt;
868 for (
int ic = 0; ic <
m_Nc; ++ic) {
870 double wt1r = mult_uv_r(&up[ic2 + ig], &
vcp2_yp[ix1],
m_Nc);
871 double wt1i = mult_uv_i(&up[ic2 + ig], &
vcp2_yp[ix1],
m_Nc);
872 double wt2r = mult_uv_r(&up[ic2 + ig], &
vcp2_yp[ix2],
m_Nc);
873 double wt2i = mult_uv_i(&up[ic2 + ig], &
vcp2_yp[ix2],
m_Nc);
874 set_sp4_yp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
888 int Nvc2 =
m_Nvc * 2;
893 double *vp = v.
ptr(0);
894 const double *wp = w.
ptr(0);
897 int ith, nth, is, ns;
898 set_threadtask(ith, nth, is, ns,
m_Nvol2);
902 for (
int site = is; site < ns; ++site) {
903 int ix = site %
m_Nx2;
904 int iyzt = site /
m_Nx2;
905 int iy = iyzt %
m_Ny;
906 int izt = iyzt /
m_Ny;
907 int ixzt = ix +
m_Nx2 * izt;
908 if (iy ==
m_Ny - 1) {
909 int in = Nvcd * site;
910 int ig =
m_Ndf * site;
911 int ix1 = Nvc2 * ixzt;
914 double vt1[
NVC], vt2[
NVC];
915 set_sp2_ym(vt1, vt2, &wp[in],
m_Nc);
916 for (
int ic = 0; ic <
m_Nc; ++ic) {
919 int ici = 2 * ic + 1;
920 vcp1_ym[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
921 vcp1_ym[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
922 vcp1_ym[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
923 vcp1_ym[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
937 for (
int site = is; site < ns; ++site) {
938 int ix = site %
m_Nx2;
939 int iyzt = site /
m_Nx2;
940 int iy = iyzt %
m_Ny;
941 int izt = iyzt /
m_Ny;
942 int ixzt = ix +
m_Nx2 * izt;
943 int nei = ix +
m_Nx2 * (iy - 1 +
m_Ny * izt);
944 int iv = Nvcd * site;
947 int ig =
m_Ndf * nei;
949 double vt1[
NVC], vt2[
NVC];
950 set_sp2_ym(vt1, vt2, &wp[in],
m_Nc);
951 for (
int ic = 0; ic <
m_Nc; ++ic) {
953 double wt1r = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
954 double wt1i = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
955 double wt2r = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
956 double wt2i = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
957 set_sp4_ym(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
960 int ix1 = Nvc2 * ixzt;
962 for (
int ic = 0; ic <
m_Nc; ++ic) {
963 double wt1r = bc2 *
vcp2_ym[2 * ic + ix1];
964 double wt1i = bc2 *
vcp2_ym[2 * ic + 1 + ix1];
965 double wt2r = bc2 *
vcp2_ym[2 * ic + ix2];
966 double wt2i = bc2 *
vcp2_ym[2 * ic + 1 + ix2];
967 set_sp4_ym(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
981 int Nvc2 =
m_Nvc * 2;
986 double *vp = v.
ptr(0);
987 const double *wp = w.
ptr(0);
990 int ith, nth, is, ns;
991 set_threadtask(ith, nth, is, ns,
m_Nvol2);
997 for (
int site = is; site < ns; ++site) {
998 int ixy = site % Nxy;
999 int izt = site / Nxy;
1000 int iz = izt %
m_Nz;
1001 int it = izt /
m_Nz;
1002 int ixyt = ixy + Nxy * it;
1004 int in = Nvcd * site;
1005 int ix1 = Nvc2 * ixyt;
1006 int ix2 = ix1 +
NVC;
1007 double vt1[
NVC], vt2[
NVC];
1008 set_sp2_zp(vt1, vt2, &wp[in],
m_Nc);
1009 for (
int ivc = 0; ivc <
NVC; ++ivc) {
1010 vcp1_zp[ivc + ix1] = bc2 * vt1[ivc];
1011 vcp1_zp[ivc + ix2] = bc2 * vt2[ivc];
1025 for (
int site = is; site < ns; ++site) {
1026 int ixy = site % Nxy;
1027 int izt = site / Nxy;
1028 int iz = izt %
m_Nz;
1029 int it = izt /
m_Nz;
1030 int ixyt = ixy + Nxy * it;
1031 int nei = ixy + Nxy * (iz + 1 +
m_Nz * it);
1032 int iv = Nvcd * site;
1033 int ig =
m_Ndf * site;
1035 if (iz <
m_Nz - 1) {
1036 int in = Nvcd * nei;
1037 double vt1[
NVC], vt2[
NVC];
1038 set_sp2_zp(vt1, vt2, &wp[in],
m_Nc);
1039 for (
int ic = 0; ic <
m_Nc; ++ic) {
1041 double wt1r = mult_uv_r(&up[ic2 + ig], vt1,
m_Nc);
1042 double wt1i = mult_uv_i(&up[ic2 + ig], vt1,
m_Nc);
1043 double wt2r = mult_uv_r(&up[ic2 + ig], vt2,
m_Nc);
1044 double wt2i = mult_uv_i(&up[ic2 + ig], vt2,
m_Nc);
1045 set_sp4_zp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1048 int ix1 = Nvc2 * ixyt;
1049 int ix2 = ix1 +
NVC;
1050 for (
int ic = 0; ic <
m_Nc; ++ic) {
1052 double wt1r = mult_uv_r(&up[ic2 + ig], &
vcp2_zp[ix1],
m_Nc);
1053 double wt1i = mult_uv_i(&up[ic2 + ig], &
vcp2_zp[ix1],
m_Nc);
1054 double wt2r = mult_uv_r(&up[ic2 + ig], &
vcp2_zp[ix2],
m_Nc);
1055 double wt2i = mult_uv_i(&up[ic2 + ig], &
vcp2_zp[ix2],
m_Nc);
1056 set_sp4_zp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1070 int Nvc2 =
m_Nvc * 2;
1075 double *vp = v.
ptr(0);
1076 const double *wp = w.
ptr(0);
1079 int ith, nth, is, ns;
1080 set_threadtask(ith, nth, is, ns,
m_Nvol2);
1086 for (
int site = is; site < ns; ++site) {
1087 int ixy = site % Nxy;
1088 int izt = site / Nxy;
1089 int iz = izt %
m_Nz;
1090 int it = izt /
m_Nz;
1091 int ixyt = ixy + Nxy * it;
1092 if (iz ==
m_Nz - 1) {
1093 int in = Nvcd * site;
1094 int ig =
m_Ndf * site;
1095 int ix1 = Nvc2 * ixyt;
1096 int ix2 = ix1 +
NVC;
1098 double vt1[
NVC], vt2[
NVC];
1099 set_sp2_zm(vt1, vt2, &wp[in],
m_Nc);
1100 for (
int ic = 0; ic <
m_Nc; ++ic) {
1103 int ici = 2 * ic + 1;
1104 vcp1_zm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1105 vcp1_zm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1106 vcp1_zm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1107 vcp1_zm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1121 for (
int site = is; site < ns; ++site) {
1122 int ixy = site % Nxy;
1123 int izt = site / Nxy;
1124 int iz = izt %
m_Nz;
1125 int it = izt /
m_Nz;
1126 int ixyt = ixy + Nxy * it;
1127 int nei = ixy + Nxy * (iz - 1 +
m_Nz * it);
1128 int iv = Nvcd * site;
1131 int ig =
m_Ndf * nei;
1132 int in = Nvcd * nei;
1133 double vt1[
NVC], vt2[
NVC];
1134 set_sp2_zm(vt1, vt2, &wp[in],
m_Nc);
1135 for (
int ic = 0; ic <
m_Nc; ++ic) {
1137 double wt1r = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1138 double wt1i = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1139 double wt2r = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1140 double wt2i = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1141 set_sp4_zm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1144 int ix1 = Nvc2 * ixyt;
1145 int ix2 = ix1 +
NVC;
1146 for (
int ic = 0; ic <
m_Nc; ++ic) {
1147 double wt1r = bc2 *
vcp2_zm[2 * ic + ix1];
1148 double wt1i = bc2 *
vcp2_zm[2 * ic + 1 + ix1];
1149 double wt2r = bc2 *
vcp2_zm[2 * ic + ix2];
1150 double wt2i = bc2 *
vcp2_zm[2 * ic + 1 + ix2];
1151 set_sp4_zm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1162 const Field& w,
const int ieo)
1166 int Nvc2 =
m_Nvc * 2;
1171 double *vp = v.
ptr(0);
1172 const double *wp = w.
ptr(0);
1175 int ith, nth, is, ns;
1176 set_threadtask(ith, nth, is, ns,
m_Nvol2);
1182 for (
int site = is; site < ns; ++site) {
1183 int ixyz = site % Nxyz;
1184 int it = site / Nxyz;
1186 int in = Nvcd * site;
1187 int ix1 = Nvc2 * ixyz;
1188 int ix2 = ix1 +
NVC;
1189 double vt1[
NVC], vt2[
NVC];
1190 set_sp2_tp_dirac(vt1, vt2, &wp[in],
m_Nc);
1191 for (
int ivc = 0; ivc <
NVC; ++ivc) {
1192 vcp1_tp[ivc + ix1] = bc2 * vt1[ivc];
1193 vcp1_tp[ivc + ix2] = bc2 * vt2[ivc];
1207 for (
int site = is; site < ns; ++site) {
1208 int ixyz = site % Nxyz;
1209 int it = site / Nxyz;
1210 int nei = ixyz + Nxyz * (it + 1);
1211 int iv = Nvcd * site;
1212 int ig =
m_Ndf * site;
1214 if (it <
m_Nt - 1) {
1215 int in = Nvcd * nei;
1216 double vt1[
NVC], vt2[
NVC];
1217 set_sp2_tp_dirac(vt1, vt2, &wp[in],
m_Nc);
1218 for (
int ic = 0; ic <
m_Nc; ++ic) {
1220 double wt1r = mult_uv_r(&up[ic2 + ig], vt1,
m_Nc);
1221 double wt1i = mult_uv_i(&up[ic2 + ig], vt1,
m_Nc);
1222 double wt2r = mult_uv_r(&up[ic2 + ig], vt2,
m_Nc);
1223 double wt2i = mult_uv_i(&up[ic2 + ig], vt2,
m_Nc);
1224 set_sp4_tp_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1227 int ix1 = Nvc2 * ixyz;
1228 int ix2 = ix1 +
NVC;
1229 for (
int ic = 0; ic <
m_Nc; ++ic) {
1231 double wt1r = mult_uv_r(&up[ic2 + ig], &
vcp2_tp[ix1],
m_Nc);
1232 double wt1i = mult_uv_i(&up[ic2 + ig], &
vcp2_tp[ix1],
m_Nc);
1233 double wt2r = mult_uv_r(&up[ic2 + ig], &
vcp2_tp[ix2],
m_Nc);
1234 double wt2i = mult_uv_i(&up[ic2 + ig], &
vcp2_tp[ix2],
m_Nc);
1235 set_sp4_tp_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1246 const Field& w,
const int ieo)
1250 int Nvc2 =
m_Nvc * 2;
1255 double *vp = v.
ptr(0);
1256 const double *wp = w.
ptr(0);
1259 int ith, nth, is, ns;
1260 set_threadtask(ith, nth, is, ns,
m_Nvol2);
1266 for (
int site = is; site < ns; ++site) {
1267 int ixyz = site % Nxyz;
1268 int it = site / Nxyz;
1269 if (it ==
m_Nt - 1) {
1270 int in = Nvcd * site;
1271 int ig =
m_Ndf * site;
1272 int ix1 = Nvc2 * ixyz;
1273 int ix2 = ix1 +
NVC;
1275 double vt1[
NVC], vt2[
NVC];
1276 set_sp2_tm_dirac(vt1, vt2, &wp[in],
m_Nc);
1277 for (
int ic = 0; ic <
m_Nc; ++ic) {
1280 int ici = 2 * ic + 1;
1281 vcp1_tm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1282 vcp1_tm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1283 vcp1_tm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1284 vcp1_tm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1298 for (
int site = is; site < ns; ++site) {
1299 int ixyz = site % Nxyz;
1300 int it = site / Nxyz;
1301 int nei = ixyz + Nxyz * (it - 1);
1302 int iv = Nvcd * site;
1305 int ig =
m_Ndf * nei;
1306 int in = Nvcd * nei;
1307 double vt1[
NVC], vt2[
NVC];
1308 set_sp2_tm_dirac(vt1, vt2, &wp[in],
m_Nc);
1309 for (
int ic = 0; ic <
m_Nc; ++ic) {
1311 double wt1r = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1312 double wt1i = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1313 double wt2r = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1314 double wt2i = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1315 set_sp4_tm_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1318 int ix1 = Nvc2 * ixyz;
1319 int ix2 = ix1 +
NVC;
1320 for (
int ic = 0; ic <
m_Nc; ++ic) {
1322 int ici = 2 * ic + 1;
1323 double wt1r = bc2 *
vcp2_tm[icr + ix1];
1324 double wt1i = bc2 *
vcp2_tm[ici + ix1];
1325 double wt2r = bc2 *
vcp2_tm[icr + ix2];
1326 double wt2i = bc2 *
vcp2_tm[ici + ix2];
1327 set_sp4_tm_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1338 const Field& w,
const int ieo)
1342 int Nvc2 =
m_Nvc * 2;
1347 double *vp = v.
ptr(0);
1348 const double *wp = w.
ptr(0);
1351 int ith, nth, is, ns;
1352 set_threadtask(ith, nth, is, ns,
m_Nvol2);
1358 for (
int site = is; site < ns; ++site) {
1359 int ixyz = site % Nxyz;
1360 int it = site / Nxyz;
1362 int in = Nvcd * site;
1363 int ix1 = Nvc2 * ixyz;
1364 int ix2 = ix1 +
NVC;
1365 double vt1[
NVC], vt2[
NVC];
1366 set_sp2_tp_chiral(vt1, vt2, &wp[in],
m_Nc);
1367 for (
int ivc = 0; ivc <
NVC; ++ivc) {
1368 vcp1_tp[ivc + ix1] = bc2 * vt1[ivc];
1369 vcp1_tp[ivc + ix2] = bc2 * vt2[ivc];
1383 for (
int site = is; site < ns; ++site) {
1384 int ixyz = site % Nxyz;
1385 int it = site / Nxyz;
1386 int nei = ixyz + Nxyz * (it + 1);
1387 int iv = Nvcd * site;
1388 int ig =
m_Ndf * site;
1390 if (it <
m_Nt - 1) {
1391 int in = Nvcd * nei;
1392 double vt1[
NVC], vt2[
NVC];
1393 set_sp2_tp_chiral(vt1, vt2, &wp[in],
m_Nc);
1394 for (
int ic = 0; ic <
m_Nc; ++ic) {
1396 double wt1r = mult_uv_r(&up[ic2 + ig], vt1,
m_Nc);
1397 double wt1i = mult_uv_i(&up[ic2 + ig], vt1,
m_Nc);
1398 double wt2r = mult_uv_r(&up[ic2 + ig], vt2,
m_Nc);
1399 double wt2i = mult_uv_i(&up[ic2 + ig], vt2,
m_Nc);
1400 set_sp4_tp_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1403 int ix1 = Nvc2 * ixyz;
1404 int ix2 = ix1 +
NVC;
1405 for (
int ic = 0; ic <
m_Nc; ++ic) {
1407 double wt1r = mult_uv_r(&up[ic2 + ig], &
vcp2_tp[ix1],
m_Nc);
1408 double wt1i = mult_uv_i(&up[ic2 + ig], &
vcp2_tp[ix1],
m_Nc);
1409 double wt2r = mult_uv_r(&up[ic2 + ig], &
vcp2_tp[ix2],
m_Nc);
1410 double wt2i = mult_uv_i(&up[ic2 + ig], &
vcp2_tp[ix2],
m_Nc);
1411 set_sp4_tp_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1422 const Field& w,
const int ieo)
1426 int Nvc2 =
m_Nvc * 2;
1431 double *vp = v.
ptr(0);
1432 const double *wp = w.
ptr(0);
1435 int ith, nth, is, ns;
1436 set_threadtask(ith, nth, is, ns,
m_Nvol2);
1442 for (
int site = is; site < ns; ++site) {
1443 int ixyz = site % Nxyz;
1444 int it = site / Nxyz;
1445 if (it ==
m_Nt - 1) {
1446 int in = Nvcd * site;
1447 int ig =
m_Ndf * site;
1448 int ix1 = Nvc2 * ixyz;
1449 int ix2 = ix1 +
NVC;
1451 double vt1[
NVC], vt2[
NVC];
1452 set_sp2_tm_chiral(vt1, vt2, &wp[in],
m_Nc);
1453 for (
int ic = 0; ic <
m_Nc; ++ic) {
1456 int ici = 2 * ic + 1;
1457 vcp1_tm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1458 vcp1_tm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1459 vcp1_tm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1460 vcp1_tm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1474 for (
int site = is; site < ns; ++site) {
1475 int ixyz = site % Nxyz;
1476 int it = site / Nxyz;
1477 int nei = ixyz + Nxyz * (it - 1);
1478 int iv = Nvcd * site;
1481 int ig =
m_Ndf * nei;
1482 int in = Nvcd * nei;
1483 double vt1[
NVC], vt2[
NVC];
1484 set_sp2_tm_chiral(vt1, vt2, &wp[in],
m_Nc);
1485 for (
int ic = 0; ic <
m_Nc; ++ic) {
1487 double wt1r = mult_udagv_r(&up[ic2 + ig], vt1,
m_Nc);
1488 double wt1i = mult_udagv_i(&up[ic2 + ig], vt1,
m_Nc);
1489 double wt2r = mult_udagv_r(&up[ic2 + ig], vt2,
m_Nc);
1490 double wt2i = mult_udagv_i(&up[ic2 + ig], vt2,
m_Nc);
1491 set_sp4_tm_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1494 int ix1 = Nvc2 * ixyz;
1495 int ix2 = ix1 +
NVC;
1496 for (
int ic = 0; ic <
m_Nc; ++ic) {
1497 double wt1r = bc2 *
vcp2_tm[2 * ic + ix1];
1498 double wt1i = bc2 *
vcp2_tm[2 * ic + 1 + ix1];
1499 double wt2r = bc2 *
vcp2_tm[2 * ic + ix2];
1500 double wt2i = bc2 *
vcp2_tm[2 * ic + 1 + ix2];
1501 set_sp4_tm_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i,
m_Nc);
1525 }
else if (
m_repr ==
"Chiral") {
1533 double gflop = flop_site * ((Nvol / 2) * (NPE / 1.0e+9));