20 #ifdef USE_FACTORY_AUTOREGISTER
22 bool init = Fopr_Clover_SF::register_factory();
30 inline double mult_uv_r(
const double *g,
const double *w)
32 return g[0] * w[0] - g[1] * w[1]
33 + g[2] * w[2] - g[3] * w[3]
34 + g[4] * w[4] - g[5] * w[5];
38 inline double mult_uv_i(
const double *g,
const double *w)
40 return g[0] * w[1] + g[1] * w[0]
41 + g[2] * w[3] + g[3] * w[2]
42 + g[4] * w[5] + g[5] * w[4];
125 std::string str_gmset_type;
128 std::vector<double> phi, phipr;
131 int err_optional = 0;
132 err_optional += params.
fetch_string(
"gamma_matrix_type", str_gmset_type);
155 const std::vector<int> bc,
156 const std::vector<double> phi,
157 const std::vector<double> phipr)
161 assert(bc.size() ==
m_Ndim);
175 for (
int i = 0; i < 3; ++i) {
186 for (
int mu = 0; mu <
m_Ndim; ++mu) {
238 if (ith == 0)
m_mode = mode;
249 }
else if (
m_mode ==
"DdagD") {
251 }
else if (
m_mode ==
"Ddag") {
253 }
else if (
m_mode ==
"H") {
268 }
else if (
m_mode ==
"DdagD") {
270 }
else if (
m_mode ==
"Ddag") {
272 }
else if (
m_mode ==
"H") {
284 const std::string mode)
288 }
else if (mode ==
"DdagD") {
290 }
else if (mode ==
"Ddag") {
292 }
else if (mode ==
"H") {
304 const std::string mode)
308 }
else if (mode ==
"DdagD") {
310 }
else if (mode ==
"Ddag") {
312 }
else if (mode ==
"H") {
325 assert(f.
nex() == 1);
337 assert(f.
nex() == 1);
348 assert(f.
nex() == 1);
358 assert(f.
nex() == 1);
375 const int mu,
const int nu)
395 assert(w.
nex() == 1);
397 const int Nvc = 2 *
m_Nc;
402 const int id3 = Nvc * 2;
403 const int id4 = Nvc * 3;
405 const double *w2 = w.
ptr(0);
406 double *v2 = v.
ptr(0);
418 int ith, nth, is, ns;
419 set_threadtask(ith, nth, is, ns,
m_Nvol);
421 for (
int site = is; site < ns; ++site) {
422 int iv = Nvc *
m_Nd * site;
425 for (
int ic = 0; ic <
m_Nc; ++ic) {
427 int ic_i = 2 * ic + 1;
428 int ic_g = ic * Nvc + ig;
431 v2[ic_r + id1 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id2 + iv]);
432 v2[ic_i + id1 + iv] += mult_uv_r(&Bx[ic_g], &w2[id2 + iv]);
433 v2[ic_r + id2 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id1 + iv]);
434 v2[ic_i + id2 + iv] += mult_uv_r(&Bx[ic_g], &w2[id1 + iv]);
436 v2[ic_r + id3 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id4 + iv]);
437 v2[ic_i + id3 + iv] += mult_uv_r(&Bx[ic_g], &w2[id4 + iv]);
438 v2[ic_r + id4 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id3 + iv]);
439 v2[ic_i + id4 + iv] += mult_uv_r(&Bx[ic_g], &w2[id3 + iv]);
442 v2[ic_r + id1 + iv] += mult_uv_r(&By[ic_g], &w2[id2 + iv]);
443 v2[ic_i + id1 + iv] += mult_uv_i(&By[ic_g], &w2[id2 + iv]);
444 v2[ic_r + id2 + iv] -= mult_uv_r(&By[ic_g], &w2[id1 + iv]);
445 v2[ic_i + id2 + iv] -= mult_uv_i(&By[ic_g], &w2[id1 + iv]);
447 v2[ic_r + id3 + iv] += mult_uv_r(&By[ic_g], &w2[id4 + iv]);
448 v2[ic_i + id3 + iv] += mult_uv_i(&By[ic_g], &w2[id4 + iv]);
449 v2[ic_r + id4 + iv] -= mult_uv_r(&By[ic_g], &w2[id3 + iv]);
450 v2[ic_i + id4 + iv] -= mult_uv_i(&By[ic_g], &w2[id3 + iv]);
453 v2[ic_r + id1 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id1 + iv]);
454 v2[ic_i + id1 + iv] += mult_uv_r(&Bz[ic_g], &w2[id1 + iv]);
455 v2[ic_r + id2 + iv] += mult_uv_i(&Bz[ic_g], &w2[id2 + iv]);
456 v2[ic_i + id2 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id2 + iv]);
458 v2[ic_r + id3 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id3 + iv]);
459 v2[ic_i + id3 + iv] += mult_uv_r(&Bz[ic_g], &w2[id3 + iv]);
460 v2[ic_r + id4 + iv] += mult_uv_i(&Bz[ic_g], &w2[id4 + iv]);
461 v2[ic_i + id4 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id4 + iv]);
464 v2[ic_r + id1 + iv] += mult_uv_i(&Ex[ic_g], &w2[id4 + iv]);
465 v2[ic_i + id1 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id4 + iv]);
466 v2[ic_r + id2 + iv] += mult_uv_i(&Ex[ic_g], &w2[id3 + iv]);
467 v2[ic_i + id2 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id3 + iv]);
469 v2[ic_r + id3 + iv] += mult_uv_i(&Ex[ic_g], &w2[id2 + iv]);
470 v2[ic_i + id3 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id2 + iv]);
471 v2[ic_r + id4 + iv] += mult_uv_i(&Ex[ic_g], &w2[id1 + iv]);
472 v2[ic_i + id4 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id1 + iv]);
475 v2[ic_r + id1 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id4 + iv]);
476 v2[ic_i + id1 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id4 + iv]);
477 v2[ic_r + id2 + iv] += mult_uv_r(&Ey[ic_g], &w2[id3 + iv]);
478 v2[ic_i + id2 + iv] += mult_uv_i(&Ey[ic_g], &w2[id3 + iv]);
480 v2[ic_r + id3 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id2 + iv]);
481 v2[ic_i + id3 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id2 + iv]);
482 v2[ic_r + id4 + iv] += mult_uv_r(&Ey[ic_g], &w2[id1 + iv]);
483 v2[ic_i + id4 + iv] += mult_uv_i(&Ey[ic_g], &w2[id1 + iv]);
486 v2[ic_r + id1 + iv] += mult_uv_i(&Ez[ic_g], &w2[id3 + iv]);
487 v2[ic_i + id1 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id3 + iv]);
488 v2[ic_r + id2 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id4 + iv]);
489 v2[ic_i + id2 + iv] += mult_uv_r(&Ez[ic_g], &w2[id4 + iv]);
491 v2[ic_r + id3 + iv] += mult_uv_i(&Ez[ic_g], &w2[id1 + iv]);
492 v2[ic_i + id3 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id1 + iv]);
493 v2[ic_r + id4 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id2 + iv]);
494 v2[ic_i + id4 + iv] += mult_uv_r(&Ez[ic_g], &w2[id2 + iv]);
526 const int mu,
const int nu)
566 vout.
general(
m_vl,
"Warning at %s: flop_count() has not been implemented.\n",
569 const double gflop = 0.0;