Bridge++  Ver. 2.0.2
afopr_Wilson-tmpl.h
Go to the documentation of this file.
1 
11 
12 template<typename AFIELD>
13 const std::string AFopr_Wilson<AFIELD>::class_name = "AFopr_Wilson";
14 
15 //====================================================================
16 template<typename AFIELD>
18 {
20 
21  // switch of coomunication
22  int req_comm = 1; // set 1 if communication forced any time
23  //int req_comm = 0; // set 0 if communication called in necessary
24 
25  std::string vlevel;
26  if (!params.fetch_string("verbose_level", vlevel)) {
27  m_vl = vout.set_verbose_level(vlevel);
28  } else {
29  m_vl = CommonParameters::Vlevel();
30  }
31 
32  vout.general(m_vl, "%s: construction\n", class_name.c_str());
33 
34  m_repr = "Dirac"; // now only the Dirac repr is available.
35 
36  std::string repr;
37  if (!params.fetch_string("gamma_matrix_type", repr)) {
38  if (repr != "Dirac") {
39  vout.crucial(" Error at %s: unsupported gamma-matrix type: %s\n",
40  class_name.c_str(), repr.c_str());
41  exit(EXIT_FAILURE);
42  }
43  }
44 
45  m_Nc = CommonParameters::Nc();
46  if (m_Nc != 3) {
47  vout.crucial("%s: only applicable to Nc = 3\n",
48  class_name.c_str());
49  exit(EXIT_FAILURE);
50  }
51 
52  m_Nd = CommonParameters::Nd();
53  m_Nvc = 2 * m_Nc;
54  m_Ndf = 2 * m_Nc * m_Nc;
55 
56  m_Nx = CommonParameters::Nx();
57  m_Ny = CommonParameters::Ny();
58  m_Nz = CommonParameters::Nz();
59  m_Nt = CommonParameters::Nt();
60  m_Nst = CommonParameters::Nvol();
61  m_Ndim = CommonParameters::Ndim();
62 
63  m_Nxv = m_Nx / VLENX;
64  m_Nyv = m_Ny / VLENY;
65  m_Nstv = m_Nst / VLEN;
66 
67  if (VLENX * m_Nxv != m_Nx) {
68  vout.crucial(m_vl, "%s: Nx must be multiple of VLENX.\n",
69  class_name.c_str());
70  exit(EXIT_FAILURE);
71  }
72  if (VLENY * m_Nyv != m_Ny) {
73  vout.crucial(m_vl, "%s: Ny must be multiple of VLENY.\n",
74  class_name.c_str());
75  exit(EXIT_FAILURE);
76  }
77 
78  vout.general(m_vl, " VLENX = %2d Nxv = %d\n", VLENX, m_Nxv);
79  vout.general(m_vl, " VLENY = %2d Nyv = %d\n", VLENY, m_Nyv);
80  vout.general(m_vl, " VLEN = %2d Nstv = %d\n", VLEN, m_Nstv);
81 
82  m_Nsize[0] = m_Nxv;
83  m_Nsize[1] = m_Nyv;
84  m_Nsize[2] = m_Nz;
85  m_Nsize[3] = m_Nt;
86 
87  do_comm_any = 0;
88  for (int mu = 0; mu < m_Ndim; ++mu) {
89  do_comm[mu] = 1;
90  if ((req_comm == 0) && (Communicator::npe(mu) == 1)) do_comm[mu] = 0;
91  do_comm_any += do_comm[mu];
92  vout.general(" do_comm[%d] = %d\n", mu, do_comm[mu]);
93  }
94 
95  m_bdsize.resize(m_Ndim);
96  int Nd2 = m_Nd / 2;
97  m_bdsize[0] = m_Nvc * Nd2 * m_Ny * m_Nz * m_Nt;
98  m_bdsize[1] = m_Nvc * Nd2 * m_Nx * m_Nz * m_Nt;
99  m_bdsize[2] = m_Nvc * Nd2 * m_Nx * m_Ny * m_Nt;
100  m_bdsize[3] = m_Nvc * Nd2 * m_Nx * m_Ny * m_Nz;
101 
102  setup_channels();
103 
104  // gauge configuration.
105  m_U.reset(NDF, m_Nst, m_Ndim);
106 
107  // working vectors.
108  int NinF = 2 * m_Nc * m_Nd;
109  m_v2.reset(NinF, m_Nst, 1);
110 
112 
113  set_parameters(params);
114 
116 
117  vout.general(m_vl, "%s: construction finished.\n",
118  class_name.c_str());
119 }
120 
121 
122 //====================================================================
123 template<typename AFIELD>
125 {
126  chsend_up.resize(m_Ndim);
127  chrecv_up.resize(m_Ndim);
128  chsend_dn.resize(m_Ndim);
129  chrecv_dn.resize(m_Ndim);
130 
131  for (int mu = 0; mu < m_Ndim; ++mu) {
132  int tag_up, tag_dn;
133  size_t Nvsize = m_bdsize[mu] * sizeof(real_t);
134 
135  chsend_dn[mu].send_init(Nvsize, mu, -1);
136  chsend_up[mu].send_init(Nvsize, mu, 1);
137 #ifdef USE_MPI
138  chrecv_up[mu].recv_init(Nvsize, mu, 1);
139  chrecv_dn[mu].recv_init(Nvsize, mu, -1);
140 #else
141  void *buf_up = (void *)chsend_dn[mu].ptr();
142  chrecv_up[mu].recv_init(Nvsize, mu, 1, buf_up);
143  void *buf_dn = (void *)chsend_up[mu].ptr();
144  chrecv_dn[mu].recv_init(Nvsize, mu, -1, buf_dn);
145 #endif
146 
147  if (do_comm[mu] == 1) {
148  chset_send.append(chsend_up[mu]);
149  chset_send.append(chsend_dn[mu]);
150  chset_recv.append(chrecv_up[mu]);
151  chset_recv.append(chrecv_dn[mu]);
152  }
153  }
154 }
155 
156 
157 //====================================================================
158 template<typename AFIELD>
160 {
162 
163  // nothing to do at present.
164 }
165 
166 
167 //====================================================================
168 template<typename AFIELD>
170 {
171  double kappa;
172  std::vector<int> bc;
173 
174  int err = 0;
175  err += params.fetch_double("hopping_parameter", kappa);
176  err += params.fetch_int_vector("boundary_condition", bc);
177  if (err) {
178  vout.crucial(m_vl, "Error at %s: input parameter not found.\n",
179  class_name.c_str());
180  exit(EXIT_FAILURE);
181  }
182 
183  set_parameters(real_t(kappa), bc);
184 }
185 
186 
187 //====================================================================
188 template<typename AFIELD>
190  const std::vector<int> bc)
191 {
192  assert(bc.size() == m_Ndim);
193 
194 #pragma omp barrier
195 
196  int ith = ThreadManager::get_thread_id();
197 
198  if (ith == 0) {
199  m_CKs = CKs;
200  m_boundary.resize(m_Ndim);
201  for (int mu = 0; mu < m_Ndim; ++mu) {
202  m_boundary[mu] = bc[mu];
203  }
204  }
205 
206  vout.general(m_vl, "%s: set parameters\n", class_name.c_str());
207  vout.general(m_vl, " gamma-matrix type = %s\n", m_repr.c_str());
208  vout.general(m_vl, " kappa = %8.4f\n", m_CKs);
209  for (int mu = 0; mu < m_Ndim; ++mu) {
210  vout.general(m_vl, " boundary[%d] = %2d\n", mu, m_boundary[mu]);
211  }
212 
213 #pragma omp barrier
214 }
215 
216 
217 //====================================================================
218 template<typename AFIELD>
220 {
221  params.set_double("hopping_parameter", double(m_CKs));
222  params.set_int_vector("boundary_condition", m_boundary);
223  params.set_string("gamma_matrix_type", m_repr);
224 
225  params.set_string("verbose_level", vout.get_verbose_level(m_vl));
226 }
227 
228 
229 //====================================================================
230 template<typename AFIELD>
232 {
233  int nth = ThreadManager::get_num_threads();
234 
235  vout.detailed(m_vl, "%s: set_config is called: num_threads = %d\n",
236  class_name.c_str(), nth);
237 
238  if (nth > 1) {
239  set_config_impl(u);
240  } else {
241  set_config_omp(u);
242  }
243 
244  vout.detailed(m_vl, "%s: set_config finished\n", class_name.c_str());
245 }
246 
247 
248 //====================================================================
249 template<typename AFIELD>
251 {
252  vout.detailed(m_vl, " set_config_omp is called.\n");
253 
254 #pragma omp parallel
255  {
256  set_config_impl(u);
257  }
258 }
259 
260 
261 //====================================================================
262 template<typename AFIELD>
264 {
265 #pragma omp barrier
266 
267  int ith = ThreadManager::get_thread_id();
268 
269  if (ith == 0) m_conf = u;
270 
272 
273  convert_gauge(index, m_U, *u);
274 
275  QXS_Gauge::set_boundary(m_U, m_boundary);
276 }
277 
278 
279 //====================================================================
280 template<typename AFIELD>
282 {
284  convert_spinor(index_lex, m_v2, w);
285 
286  mult_gm4(v, m_v2);
287 }
288 
289 
290 //====================================================================
291 template<typename AFIELD>
293 {
294  mult_gm4(m_v2, w);
295 
297  reverse_spinor(index_lex, v, m_v2);
298 }
299 
300 
301 //====================================================================
302 template<typename AFIELD>
303 void AFopr_Wilson<AFIELD>::mult_up(int mu, AFIELD& v, const AFIELD& w)
304 {
305  real_t *vp = v.ptr(0);
306  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
307 
308  if (mu == 0) {
309  mult_xp(vp, wp);
310  } else if (mu == 1) {
311  mult_yp(vp, wp);
312  } else if (mu == 2) {
313  mult_zp(vp, wp);
314  } else if (mu == 3) {
315  mult_tp(vp, wp);
316  } else {
317  vout.crucial(m_vl, "%s: mult_up for %d direction is undefined.",
318  class_name.c_str(), mu);
319  exit(EXIT_FAILURE);
320  }
321 }
322 
323 
324 //====================================================================
325 template<typename AFIELD>
326 void AFopr_Wilson<AFIELD>::mult_dn(int mu, AFIELD& v, const AFIELD& w)
327 {
328  real_t *vp = v.ptr(0);
329  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
330 
331  if (mu == 0) {
332  mult_xm(vp, wp);
333  } else if (mu == 1) {
334  mult_ym(vp, wp);
335  } else if (mu == 2) {
336  mult_zm(vp, wp);
337  } else if (mu == 3) {
338  mult_tm(vp, wp);
339  } else {
340  vout.crucial(m_vl, "%s: mult_dn for %d direction is undefined.",
341  class_name.c_str(), mu);
342  exit(EXIT_FAILURE);
343  }
344 }
345 
346 
347 //====================================================================
348 template<typename AFIELD>
349 void AFopr_Wilson<AFIELD>::set_mode(std::string mode)
350 {
351 #pragma omp barrier
352 
353  int ith = ThreadManager::get_thread_id();
354  if (ith == 0) m_mode = mode;
355 
356 #pragma omp barrier
357 }
358 
359 
360 //====================================================================
361 template<typename AFIELD>
363 {
364  return m_mode;
365 }
366 
367 
368 //====================================================================
369 template<typename AFIELD>
371 {
372  if (m_mode == "D") {
373  return D(v, w);
374  } else if (m_mode == "DdagD") {
375  return DdagD(v, w);
376  } else if (m_mode == "Ddag") {
377  return Ddag(v, w);
378  } else if (m_mode == "H") {
379  return H(v, w);
380  } else {
381  vout.crucial(m_vl, "%s: mode undefined.\n", class_name.c_str());
382  exit(EXIT_FAILURE);
383  }
384 }
385 
386 
387 //====================================================================
388 template<typename AFIELD>
390 {
391  if (m_mode == "D") {
392  return Ddag(v, w);
393  } else if (m_mode == "DdagD") {
394  return DdagD(v, w);
395  } else if (m_mode == "Ddag") {
396  return D(v, w);
397  } else if (m_mode == "H") {
398  return H(v, w);
399  } else {
400  vout.crucial(m_vl, "%s: mode undefined.\n", class_name.c_str());
401  exit(EXIT_FAILURE);
402  }
403 }
404 
405 
406 //====================================================================
407 template<typename AFIELD>
409 {
410  mult_D(v, w);
411 }
412 
413 
414 //====================================================================
415 template<typename AFIELD>
417 {
418  D(m_v2, w);
419  mult_gm5(v, m_v2);
420  D(m_v2, v);
421  mult_gm5(v, m_v2);
422 }
423 
424 
425 //====================================================================
426 template<typename AFIELD>
428 {
429  mult_gm5(v, w);
430  D(m_v2, v);
431  mult_gm5(v, m_v2);
432 }
433 
434 
435 //====================================================================
436 template<typename AFIELD>
438 {
439  real_t *vp = v.ptr(0);
440  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
441 
442 #pragma omp barrier
443 
444  // mult_gm5(vp, wp);
445 
446  BridgeQXS::mult_wilson_gm5_dirac(vp, wp, m_Nsize);
447 
448 #pragma omp barrier
449 }
450 
451 
452 //====================================================================
453 template<typename AFIELD>
455 {
456  real_t *vp = v.ptr(0);
457  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
458 
459  int ith, nth, is, ns;
460  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
461 
462  Vsimd_t wt[2];
463 
464  for (int site = is; site < ns; ++site) {
465  for (int ic = 0; ic < NC; ++ic) {
466  for (int id = 0; id < ND2; ++id) {
467  int idx1 = 2 * (id + ND * ic) + NVCD * site;
468  load_vec(wt, &wp[VLEN * idx1], 2);
469  save_vec(&vp[VLEN * idx1], wt, 2);
470  }
471 
472  for (int id = ND2; id < ND; ++id) {
473  int idx1 = 2 * (id + ND * ic) + NVCD * site;
474  load_vec(wt, &wp[VLEN * idx1], 2);
475  scal_vec(wt, real_t(-1.0), 2);
476  save_vec(&vp[VLEN * idx1], wt, 2);
477  }
478  }
479  }
480 
481 #pragma omp barrier
482 }
483 
484 
485 //====================================================================
486 template<typename AFIELD>
488 {
489  real_t *v2 = v.ptr(0);
490  real_t *v1 = const_cast<AFIELD *>(&w)->ptr(0);
491  real_t *up = m_U.ptr(0);
492 
493  int ith = ThreadManager::get_thread_id();
494 
495 #pragma omp barrier
496 
497  if (do_comm_any > 0) {
498  if (ith == 0) chset_recv.start();
499 
500  real_t *buf1_xp = (real_t *)chsend_dn[0].ptr();
501  real_t *buf1_xm = (real_t *)chsend_up[0].ptr();
502  real_t *buf1_yp = (real_t *)chsend_dn[1].ptr();
503  real_t *buf1_ym = (real_t *)chsend_up[1].ptr();
504  real_t *buf1_zp = (real_t *)chsend_dn[2].ptr();
505  real_t *buf1_zm = (real_t *)chsend_up[2].ptr();
506  real_t *buf1_tp = (real_t *)chsend_dn[3].ptr();
507  real_t *buf1_tm = (real_t *)chsend_up[3].ptr();
508 
509  BridgeQXS::mult_wilson_1_dirac(buf1_xp, buf1_xm, buf1_yp, buf1_ym,
510  buf1_zp, buf1_zm, buf1_tp, buf1_tm,
511  up, v1, &m_boundary[0], m_Nsize, do_comm);
512 
513 #pragma omp barrier
514 
515  if (ith == 0) chset_send.start();
516  }
517 
519  m_CKs, &m_boundary[0], m_Nsize, do_comm);
520 
521  if (do_comm_any > 0) {
522  if (ith == 0) chset_recv.wait();
523 
524 #pragma omp barrier
525 
526  real_t *buf2_xp = (real_t *)chrecv_up[0].ptr();
527  real_t *buf2_xm = (real_t *)chrecv_dn[0].ptr();
528  real_t *buf2_yp = (real_t *)chrecv_up[1].ptr();
529  real_t *buf2_ym = (real_t *)chrecv_dn[1].ptr();
530  real_t *buf2_zp = (real_t *)chrecv_up[2].ptr();
531  real_t *buf2_zm = (real_t *)chrecv_dn[2].ptr();
532  real_t *buf2_tp = (real_t *)chrecv_up[3].ptr();
533  real_t *buf2_tm = (real_t *)chrecv_dn[3].ptr();
534 
536  buf2_xp, buf2_xm, buf2_yp, buf2_ym,
537  buf2_zp, buf2_zm, buf2_tp, buf2_tm,
538  m_CKs, &m_boundary[0], m_Nsize, do_comm);
539 
540  if (ith == 0) chset_send.wait();
541  }
542 
543 #pragma omp barrier
544 }
545 
546 
547 //====================================================================
548 template<typename AFIELD>
550 {
551  real_t *vp = v.ptr(0);
552  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
553 
554  clear(vp);
555 
556  mult_xp(vp, wp);
557  mult_xm(vp, wp);
558  mult_yp(vp, wp);
559  mult_ym(vp, wp);
560  mult_zp(vp, wp);
561  mult_zm(vp, wp);
562  mult_tp(vp, wp);
563  mult_tm(vp, wp);
564 
565  aypx(-m_CKs, vp, wp);
566 
567 #pragma omp barrier
568 }
569 
570 
571 //====================================================================
572 template<typename AFIELD>
574 {
575  D(m_v2, w);
576  mult_gm5(v, m_v2);
577 }
578 
579 
580 //====================================================================
581 template<typename AFIELD>
583 {
584  int ith, nth, is, ns;
585  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
586 
587  Vsimd_t vt[NVCD], wt[NVCD];
588 
589  for (int site = is; site < ns; ++site) {
590  load_vec(vt, &v[VLEN * NVCD * site], NVCD);
591  load_vec(wt, &w[VLEN * NVCD * site], NVCD);
592  aypx_vec(a, vt, wt, NVCD);
593  save_vec(&v[VLEN * NVCD * site], vt, NVCD);
594  }
595 }
596 
597 
598 //====================================================================
599 template<typename AFIELD>
601 {
602  int ith, nth, is, ns;
603  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
604 
605  Vsimd_t vt[NVCD];
606  clear_vec(vt, NVCD);
607 
608  for (int site = is; site < ns; ++site) {
609  save_vec(&v[VLEN * NVCD * site], vt, NVCD);
610  }
611 }
612 
613 
614 //====================================================================
615 template<typename AFIELD>
617 {
618  int idir = 0;
619 
620  int ith, nth, is, ns;
621  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
622 
623  Vsimd_t v2v[NVCD];
624 
625  real_t *buf1 = (real_t *)chsend_dn[0].ptr();
626  real_t *buf2 = (real_t *)chrecv_up[0].ptr();
627 
628  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
629 
630 #pragma omp barrier
631 
632  if (do_comm[0] > 0) {
633  for (int site = is; site < ns; ++site) {
634  int ix = site % m_Nxv;
635  int iyzt = site / m_Nxv;
636  if (ix == 0) {
637  int ibf = VLENY * NVC * ND2 * iyzt;
638  mult_wilson_xp1(&buf1[ibf], &v1[VLEN * NVCD * site]);
639  }
640  }
641 
642 #pragma omp barrier
643 
644 #pragma omp master
645  {
646  chrecv_up[0].start();
647  chsend_dn[0].start();
648  chrecv_up[0].wait();
649  chsend_dn[0].wait();
650  }
651 #pragma omp barrier
652  } // if(do_comm[0] == 1)
653 
654  for (int site = is; site < ns; ++site) {
655  int ix = site % m_Nxv;
656  int iyzt = site / m_Nxv;
657 
658  Vsimd_t v2v[NVCD];
659  clear_vec(v2v, NVCD);
660 
661  real_t zL[VLEN * NVCD];
662 
663  if ((ix < m_Nxv - 1) || (do_comm[0] == 0)) {
664  int nei = ix + 1 + m_Nxv * iyzt;
665  if (ix == m_Nxv - 1) nei = 0 + m_Nxv * iyzt;
666  shift_vec2_xbw(zL, &v1[VLEN * NVCD * site], &v1[VLEN * NVCD * nei], NVCD);
667  mult_wilson_xpb(v2v, &u[VLEN * NDF * site], zL);
668  } else {
669  int ibf = VLENY * NVC * ND2 * iyzt;
670  shift_vec0_xbw(zL, &v1[VLEN * NVCD * site], NVCD);
671  mult_wilson_xpb(v2v, &u[VLEN * NDF * site], zL);
672  mult_wilson_xp2(v2v, &u[VLEN * NDF * site], &buf2[ibf]);
673  }
674 
675  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
676  }
677 
678 #pragma omp barrier
679 }
680 
681 
682 //====================================================================
683 template<typename AFIELD>
685 {
686  int idir = 0;
687 
688  int ith, nth, is, ns;
689  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
690 
691  Vsimd_t v2v[NVCD];
692 
693  real_t *buf1 = (real_t *)chsend_up[0].ptr();
694  real_t *buf2 = (real_t *)chrecv_dn[0].ptr();
695 
696  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
697 
698 #pragma omp barrier
699 
700  if (do_comm[0] > 0) {
701  for (int site = is; site < ns; ++site) {
702  int ix = site % m_Nxv;
703  int iyzt = site / m_Nxv;
704  if (ix == m_Nxv - 1) {
705  int ibf = VLENY * NVC * ND2 * iyzt;
706  mult_wilson_xm1(&buf1[ibf], &u[VLEN * NDF * site],
707  &v1[VLEN * NVCD * site]);
708  }
709  }
710 
711 #pragma omp barrier
712 #pragma omp master
713  {
714  chrecv_dn[0].start();
715  chsend_up[0].start();
716  chrecv_dn[0].wait();
717  chsend_up[0].wait();
718  }
719 #pragma omp barrier
720  } // end of if(do_comm[0] > 0)
721 
722  for (int site = is; site < ns; ++site) {
723  int ix = site % m_Nxv;
724  int iyzt = site / m_Nxv;
725 
726  real_t zL[VLEN * NVCD];
727  real_t uL[VLEN * NDF];
728 
729  clear_vec(v2v, NVCD);
730 
731  if ((ix > 0) || (do_comm[0] == 0)) {
732  int nei = ix - 1 + m_Nxv * iyzt;
733  if (ix == 0) nei = m_Nxv - 1 + m_Nxv * iyzt;
734  shift_vec2_xfw(zL, &v1[VLEN * NVCD * site], &v1[VLEN * NVCD * nei], NVCD);
735  shift_vec2_xfw(uL, &u[VLEN * NDF * site], &u[VLEN * NDF * nei], NDF);
736  mult_wilson_xmb(v2v, uL, zL);
737  } else {
738  int ibf = VLENY * NVC * ND2 * iyzt;
739  shift_vec0_xfw(zL, &v1[VLEN * NVCD * site], NVCD);
740  shift_vec0_xfw(uL, &u[VLEN * NDF * site], NDF);
741  mult_wilson_xmb(v2v, uL, zL);
742  mult_wilson_xm2(v2v, &buf2[ibf]);
743  }
744 
745  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
746  }
747 
748 #pragma omp barrier
749 }
750 
751 
752 //====================================================================
753 template<typename AFIELD>
755 {
756  int idir = 1;
757  int Nxy = m_Nxv * m_Nyv;
758 
759  int ith, nth, is, ns;
760  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
761 
762  real_t *buf1 = (real_t *)chsend_dn[1].ptr();
763  real_t *buf2 = (real_t *)chrecv_up[1].ptr();
764 
765  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
766 
767 #pragma omp barrier
768 
769  if (do_comm[1] > 0) {
770  for (int site = is; site < ns; ++site) {
771  int ix = site % m_Nxv;
772  int iy = (site / m_Nxv) % m_Nyv;
773  int izt = site / Nxy;
774  if (iy == 0) {
775  int ibf = VLENX * NVC * ND2 * (ix + m_Nxv * izt);
776  mult_wilson_yp1(&buf1[ibf], &v1[VLEN * NVCD * site]);
777  }
778  }
779 
780 #pragma omp barrier
781 
782 #pragma omp master
783  {
784  chrecv_up[1].start();
785  chsend_dn[1].start();
786  chrecv_up[1].wait();
787  chsend_dn[1].wait();
788  }
789 
790 #pragma omp barrier
791  } // end of if(do_comm[1] > 0)
792 
793  for (int site = is; site < ns; ++site) {
794  int ix = site % m_Nxv;
795  int iy = (site / m_Nxv) % m_Nyv;
796  int izt = site / Nxy;
797 
798  Vsimd_t v2v[NVCD];
799  clear_vec(v2v, NVCD);
800 
801  real_t zL[VLEN * NVCD];
802 
803  if ((iy < m_Nyv - 1) || (do_comm[1] == 0)) {
804  int iy2 = (iy + 1) % m_Nyv;
805  int nei = ix + m_Nxv * (iy2 + m_Nyv * izt);
806  shift_vec2_ybw(zL, &v1[VLEN * NVCD * site], &v1[VLEN * NVCD * nei], NVCD);
807  mult_wilson_ypb(v2v, &u[VLEN * NDF * site], zL);
808  } else {
809  int ibf = VLENX * NVC * ND2 * (ix + m_Nxv * izt);
810  shift_vec0_ybw(zL, &v1[VLEN * NVCD * site], NVCD);
811  mult_wilson_ypb(v2v, &u[VLEN * NDF * site], zL);
812  mult_wilson_yp2(v2v, &u[VLEN * NDF * site], &buf2[ibf]);
813  }
814 
815  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
816  }
817 
818 #pragma omp barrier
819 }
820 
821 
822 //====================================================================
823 template<typename AFIELD>
825 {
826  int idir = 1;
827  int Nxy = m_Nxv * m_Nyv;
828 
829  int ith, nth, is, ns;
830  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
831 
832  real_t *buf1 = (real_t *)chsend_up[1].ptr();
833  real_t *buf2 = (real_t *)chrecv_dn[1].ptr();
834 
835  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
836 
837 #pragma omp barrier
838 
839  if (do_comm[1] > 0) {
840  for (int site = is; site < ns; ++site) {
841  int ix = site % m_Nxv;
842  int iy = (site / m_Nxv) % m_Nyv;
843  int izt = site / Nxy;
844  if (iy == m_Nyv - 1) {
845  int ibf = VLENX * NVC * ND2 * (ix + m_Nxv * izt);
846  mult_wilson_ym1(&buf1[ibf], &u[VLEN * NDF * site],
847  &v1[VLEN * NVCD * site]);
848  }
849  }
850 
851 #pragma omp barrier
852 
853 #pragma omp master
854  {
855  chrecv_dn[1].start();
856  chsend_up[1].start();
857  chrecv_dn[1].wait();
858  chsend_up[1].wait();
859  }
860 
861 #pragma omp barrier
862  }
863 
864  for (int site = is; site < ns; ++site) {
865  int ix = site % m_Nxv;
866  int iy = (site / m_Nxv) % m_Nyv;
867  int izt = site / Nxy;
868 
869  Vsimd_t v2v[NVCD];
870  clear_vec(v2v, NVCD);
871 
872  real_t zL[VLEN * NVCD];
873  real_t uL[VLEN * NDF];
874 
875  if ((iy != 0) || (do_comm[idir] == 0)) {
876  int iy2 = (iy - 1 + m_Nyv) % m_Nyv;
877  int nei = ix + m_Nxv * (iy2 + m_Nyv * izt);
878  shift_vec2_yfw(zL, &v1[VLEN * NVCD * site], &v1[VLEN * NVCD * nei], NVCD);
879  shift_vec2_yfw(uL, &u[VLEN * NDF * site], &u[VLEN * NDF * nei], NDF);
880  mult_wilson_ymb(v2v, uL, zL);
881  } else {
882  int ibf = VLENX * NVC * ND2 * (ix + m_Nxv * izt);
883  shift_vec0_yfw(zL, &v1[VLEN * NVCD * site], NVCD);
884  shift_vec0_yfw(uL, &u[VLEN * NDF * site], NDF);
885  mult_wilson_ymb(v2v, uL, zL);
886  mult_wilson_ym2(v2v, &buf2[ibf]);
887  }
888 
889  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
890  }
891 
892 #pragma omp barrier
893 }
894 
895 
896 //====================================================================
897 template<typename AFIELD>
899 {
900  int idir = 2;
901  int Nxy = m_Nxv * m_Nyv;
902 
903  int ith, nth, is, ns;
904  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
905 
906  real_t *buf1 = (real_t *)chsend_dn[2].ptr();
907  real_t *buf2 = (real_t *)chrecv_up[2].ptr();
908 
909  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
910 
911 #pragma omp barrier
912 
913  if (do_comm[2] > 0) {
914  for (int site = is; site < ns; ++site) {
915  int ixy = site % Nxy;
916  int iz = (site / Nxy) % m_Nz;
917  int it = site / (Nxy * m_Nz);
918  if (iz == 0) {
919  int ibf = VLEN * NVC * ND2 * (ixy + Nxy * it);
920  mult_wilson_zp1(&buf1[ibf], &v1[VLEN * NVCD * site]);
921  }
922  }
923 
924 #pragma omp barrier
925 
926 #pragma omp master
927  {
928  chrecv_up[2].start();
929  chsend_dn[2].start();
930  chrecv_up[2].wait();
931  chsend_dn[2].wait();
932  }
933 
934 #pragma omp barrier
935  }
936 
937  for (int site = is; site < ns; ++site) {
938  int ixy = site % Nxy;
939  int iz = (site / Nxy) % m_Nz;
940  int it = site / (Nxy * m_Nz);
941 
942  Vsimd_t v2v[NVCD];
943  clear_vec(v2v, NVCD);
944 
945  if ((iz != m_Nz - 1) || (do_comm[2] == 0)) {
946  int iz2 = (iz + 1) % m_Nz;
947  int nei = ixy + Nxy * (iz2 + m_Nz * it);
948  mult_wilson_zpb(v2v, &u[VLEN * NDF * site], &v1[VLEN * NVCD * nei]);
949  } else {
950  int ibf = VLEN * NVC * ND2 * (ixy + Nxy * it);
951  mult_wilson_zp2(v2v, &u[VLEN * NDF * site], &buf2[ibf]);
952  }
953 
954  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
955  }
956 
957 #pragma omp barrier
958 }
959 
960 
961 //====================================================================
962 template<typename AFIELD>
964 {
965  int idir = 2;
966  int Nxy = m_Nxv * m_Nyv;
967 
968  int ith, nth, is, ns;
969  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
970 
971  real_t *buf1 = (real_t *)chsend_up[2].ptr();
972  real_t *buf2 = (real_t *)chrecv_dn[2].ptr();
973 
974  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
975 
976 #pragma omp barrier
977 
978  if (do_comm[2] > 0) {
979  for (int site = is; site < ns; ++site) {
980  int ixy = site % Nxy;
981  int iz = (site / Nxy) % m_Nz;
982  int it = site / (Nxy * m_Nz);
983  if (iz == m_Nz - 1) {
984  int ibf = VLEN * NVC * ND2 * (ixy + Nxy * it);
985  mult_wilson_zm1(&buf1[ibf], &u[VLEN * NDF * site],
986  &v1[VLEN * NVCD * site]);
987  }
988  }
989 
990 #pragma omp barrier
991 
992 #pragma omp master
993  {
994  chrecv_dn[2].start();
995  chsend_up[2].start();
996  chrecv_dn[2].wait();
997  chsend_up[2].wait();
998  }
999 
1000 #pragma omp barrier
1001  }
1002 
1003  for (int site = is; site < ns; ++site) {
1004  int ixy = site % Nxy;
1005  int iz = (site / Nxy) % m_Nz;
1006  int it = site / (Nxy * m_Nz);
1007 
1008  Vsimd_t v2v[NVCD];
1009  clear_vec(v2v, NVCD);
1010 
1011  if ((iz > 0) || (do_comm[2] == 0)) {
1012  int iz2 = (iz - 1 + m_Nz) % m_Nz;
1013  int nei = ixy + Nxy * (iz2 + m_Nz * it);
1014  mult_wilson_zmb(v2v, &u[VLEN * NDF * nei], &v1[VLEN * NVCD * nei]);
1015  } else {
1016  int ibf = VLEN * NVC * ND2 * (ixy + Nxy * it);
1017  mult_wilson_zm2(v2v, &buf2[ibf]);
1018  }
1019 
1020  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
1021  }
1022 
1023 #pragma omp barrier
1024 }
1025 
1026 
1027 //====================================================================
1028 template<typename AFIELD>
1030 {
1031  int idir = 3;
1032  int Nxyz = m_Nxv * m_Nyv * m_Nz;
1033 
1034  int ith, nth, is, ns;
1035  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
1036 
1037  real_t *buf1 = (real_t *)chsend_dn[3].ptr();
1038  real_t *buf2 = (real_t *)chrecv_up[3].ptr();
1039 
1040  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
1041 
1042 #pragma omp barrier
1043 
1044  if (do_comm[3] > 0) {
1045  for (int site = is; site < ns; ++site) {
1046  int ixyz = site % Nxyz;
1047  int it = site / Nxyz;
1048  if (it == 0) {
1049  mult_wilson_tp1_dirac(&buf1[VLEN * NVC * ND2 * ixyz],
1050  &v1[VLEN * NVCD * site]);
1051  }
1052  }
1053 
1054 #pragma omp barrier
1055 
1056 #pragma omp master
1057  {
1058  chrecv_up[3].start();
1059  chsend_dn[3].start();
1060  chrecv_up[3].wait();
1061  chsend_dn[3].wait();
1062  }
1063 
1064 #pragma omp barrier
1065  }
1066 
1067  for (int site = is; site < ns; ++site) {
1068  int ixyz = site % Nxyz;
1069  int it = site / Nxyz;
1070 
1071  Vsimd_t v2v[NVCD];
1072  clear_vec(v2v, NVCD);
1073 
1074  if ((it < m_Nt - 1) || (do_comm[3] == 0)) {
1075  int it2 = (it + 1) % m_Nt;
1076  int nei = ixyz + Nxyz * it2;
1077  mult_wilson_tpb_dirac(v2v, &u[VLEN * NDF * site],
1078  &v1[VLEN * NVCD * nei]);
1079  } else {
1080  mult_wilson_tp2_dirac(v2v, &u[VLEN * NDF * site],
1081  &buf2[VLEN * NVC * ND2 * ixyz]);
1082  }
1083 
1084  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
1085  }
1086 
1087 #pragma omp barrier
1088 }
1089 
1090 
1091 //====================================================================
1092 template<typename AFIELD>
1094 {
1095  int idir = 3;
1096  int Nxyz = m_Nxv * m_Nyv * m_Nz;
1097 
1098  int ith, nth, is, ns;
1099  set_threadtask_mult(ith, nth, is, ns, m_Nstv);
1100 
1101  real_t *buf1 = (real_t *)chsend_up[3].ptr();
1102  real_t *buf2 = (real_t *)chrecv_dn[3].ptr();
1103 
1104  real_t *u = m_U.ptr(m_Ndf * m_Nst * idir);
1105 
1106 #pragma omp barrier
1107 
1108  if (do_comm[3] > 0) {
1109  for (int site = is; site < ns; ++site) {
1110  int ixyz = site % Nxyz;
1111  int it = site / Nxyz;
1112  if (it == m_Nt - 1) {
1113  mult_wilson_tm1_dirac(&buf1[VLEN * NVC * ND2 * ixyz],
1114  &u[VLEN * NDF * site], &v1[VLEN * NVCD * site]);
1115  }
1116  }
1117 
1118 #pragma omp barrier
1119 
1120 #pragma omp master
1121  {
1122  chrecv_dn[3].start();
1123  chsend_up[3].start();
1124  chrecv_dn[3].wait();
1125  chsend_up[3].wait();
1126  }
1127 #pragma omp barrier
1128  }
1129 
1130  for (int site = is; site < ns; ++site) {
1131  int ixyz = site % Nxyz;
1132  int it = site / Nxyz;
1133 
1134  Vsimd_t v2v[NVCD];
1135  clear_vec(v2v, NVCD);
1136 
1137  if ((it > 0) || (do_comm[3] == 0)) {
1138  int it2 = (it - 1 + m_Nt) % m_Nt;
1139  int nei = ixyz + Nxyz * it2;
1140  mult_wilson_tmb_dirac(v2v, &u[VLEN * NDF * nei],
1141  &v1[VLEN * NVCD * nei]);
1142  } else {
1143  mult_wilson_tm2_dirac(v2v, &buf2[VLEN * NVC * ND2 * ixyz]);
1144  }
1145 
1146  add_vec(&v2[VLEN * NVCD * site], v2v, NVCD);
1147  }
1148 
1149 #pragma omp barrier
1150 }
1151 
1152 
1153 //====================================================================
1154 template<typename AFIELD>
1155 double AFopr_Wilson<AFIELD>::flop_count(const std::string mode)
1156 {
1157  // The following counting explicitly depends on the implementation.
1158  // It will be recalculated when the code is modified.
1159 
1160  int Lvol = CommonParameters::Lvol();
1161  double flop_site, flop;
1162 
1163  if (m_repr == "Dirac") {
1164  flop_site = static_cast<double>(
1165  m_Nc * m_Nd * (4 + 6 * (4 * m_Nc + 2) + 2 * (4 * m_Nc + 1)));
1166  } else if (m_repr == "Chiral") {
1167  flop_site = static_cast<double>(
1168  m_Nc * m_Nd * (4 + 8 * (4 * m_Nc + 2)));
1169  } else {
1170  vout.crucial(m_vl, "%s: input repr is undefined.\n");
1171  abort();
1172  }
1173 
1174  flop = flop_site * static_cast<double>(Lvol);
1175  if ((mode == "DdagD") || (mode == "DDdag")) flop *= 2.0;
1176 
1177  return flop;
1178 }
1179 
1180 
1181 //============================================================END=====
AFopr_Wilson::mult_xm
void mult_xm(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:684
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
BridgeQXS::mult_wilson_gm5_dirac
void mult_wilson_gm5_dirac(double *v2, double *v1, int *Nsize)
Definition: mult_Wilson_qxs-inc.h:411
AFopr_Wilson::mult_tm
void mult_tm(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:1093
CommonParameters::Lvol
static long_t Lvol()
Definition: commonParameters.h:95
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
AFopr_Wilson::mult_xp
void mult_xp(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:616
BridgeQXS::mult_wilson_2_dirac
void mult_wilson_2_dirac(double *v2, double *up, double *v1, double *buf_xp, double *buf_xm, double *buf_yp, double *buf_ym, double *buf_zp, double *buf_zm, double *buf_tp, double *buf_tm, double kappa, int *bc, int *Nsize, int *do_comm)
Definition: mult_Wilson_qxs-inc.h:296
BridgeQXS::mult_wilson_1_dirac
void mult_wilson_1_dirac(double *buf_xp, double *buf_xm, double *buf_yp, double *buf_ym, double *buf_zp, double *buf_zm, double *buf_tp, double *buf_tm, double *up, double *v1, int *bc, int *Nsize, int *do_comm)
Definition: mult_Wilson_qxs-inc.h:153
AFopr_Wilson::clear
void clear(real_t *)
Definition: afopr_Wilson-tmpl.h:600
AFopr_Wilson::DdagD
void DdagD(AFIELD &, const AFIELD &)
Definition: afopr_Wilson-tmpl.h:416
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
AFopr_Wilson::mult_dag
void mult_dag(AFIELD &, const AFIELD &)
hermitian conjugate of mult.
Definition: afopr_Wilson-tmpl.h:389
Parameters
Class for parameters.
Definition: parameters.h:46
AIndex_lex
Definition: aindex_lex_base.h:17
Parameters::set_double
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
Bridge::BridgeIO::decrease_indent
void decrease_indent()
Definition: bridgeIO.h:86
AFopr_Wilson::mult_D
void mult_D(AFIELD &, const AFIELD &)
standard D mult.
Definition: afopr_Wilson-tmpl.h:487
AFopr_Wilson::set_mode
void set_mode(std::string mode)
setting mult mode.
Definition: afopr_Wilson-tmpl.h:349
AFopr_Wilson::mult_D_alt
void mult_D_alt(AFIELD &, const AFIELD &)
D mult using mult_xp, etc.
Definition: afopr_Wilson-tmpl.h:549
AFopr_Wilson::mult_gm5
void mult_gm5(AFIELD &, const AFIELD &)
multiplies gamma_5 matrix.
Definition: afopr_Wilson-tmpl.h:437
NVCD
#define NVCD
Definition: define_params_SU3.h:20
AFopr_Wilson::mult_dn
void mult_dn(int mu, AFIELD &, const AFIELD &)
downward nearest neighbor hopping term.
Definition: afopr_Wilson-tmpl.h:326
Bridge::BridgeIO::increase_indent
void increase_indent()
Definition: bridgeIO.h:85
VLEN
#define VLEN
Definition: bridgeQXS_Clover_coarse_double.cpp:12
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
AFopr_Wilson::mult_zm
void mult_zm(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:963
NDF
#define NDF
Definition: field_F_imp_SU2-inc.h:4
AFopr_Wilson::set_parameters
void set_parameters(const Parameters &params)
setting parameters by a Parameter object.
Definition: afopr_Wilson-tmpl.h:169
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
AFopr_Wilson::reverse
void reverse(Field &v, const AFIELD &w)
reverse of spinor field.
Definition: afopr_Wilson-tmpl.h:292
convert_gauge
void convert_gauge(INDEX &index, FIELD &v, const Field &w)
Definition: afield-inc.h:224
aypx
void aypx(const double a, Field &y, const Field &x)
aypx(y, a, x): y := a * y + x
Definition: field.cpp:509
Vsimd_t
Definition: vsimd_double-inc.h:13
AFopr_Wilson::mult_yp
void mult_yp(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:754
AFopr_Wilson::mult_up
void mult_up(int mu, AFIELD &, const AFIELD &)
upward nearest neighbor hopping term.
Definition: afopr_Wilson-tmpl.h:303
real_t
double real_t
Definition: bridgeQXS_Clover_coarse_double.cpp:16
AFopr_Wilson::init
void init(const Parameters &params)
initial setup.
Definition: afopr_Wilson-tmpl.h:17
AFopr_Wilson::get_parameters
void get_parameters(Parameters &params) const
get parameters via a Parameter object
Definition: afopr_Wilson-tmpl.h:219
AFopr_Wilson::set_config
void set_config(Field *u)
setting gauge configuration (common interface).
Definition: afopr_Wilson-tmpl.h:231
CommonParameters::Nx
static int Nx()
Definition: commonParameters.h:105
AFopr_Wilson::H
void H(AFIELD &, const AFIELD &)
Definition: afopr_Wilson-tmpl.h:573
AFopr_Wilson::Ddag
void Ddag(AFIELD &, const AFIELD &)
Definition: afopr_Wilson-tmpl.h:427
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
NC
#define NC
Definition: field_F_imp_SU2-inc.h:2
AFopr_Wilson::setup_channels
void setup_channels()
setup channels for communication.
Definition: afopr_Wilson-tmpl.h:124
QXS_Gauge::set_boundary
void set_boundary(AField< REALTYPE, QXS > &ulex, const std::vector< int > &boundary)
Definition: afield_Gauge-inc.h:24
reverse_spinor
void reverse_spinor(INDEX &index, Field &v, FIELD &w)
Definition: afield-inc.h:380
CommonParameters::Nt
static int Nt()
Definition: commonParameters.h:108
Parameters::fetch_int_vector
int fetch_int_vector(const string &key, vector< int > &value) const
Definition: parameters.cpp:429
AFopr_Wilson::mult_gm4
void mult_gm4(AFIELD &, const AFIELD &)
Definition: afopr_Wilson-tmpl.h:454
Communicator::npe
static int npe(const int dir)
logical grid extent
Definition: communicator.cpp:112
AFopr_Wilson::convert
void convert(AFIELD &v, const Field &w)
convert of spinor field.
Definition: afopr_Wilson-tmpl.h:281
AFopr_Wilson
Definition: afopr_Wilson.h:40
AFopr_Wilson::aypx
void aypx(real_t, real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:582
BridgeQXS::mult_wilson_bulk_dirac
void mult_wilson_bulk_dirac(double *v2, double *up, double *v1, double kappa, int *bc, int *Nsize, int *do_comm)
Definition: mult_Wilson_qxs-inc.h:17
threadManager.h
AFopr_Wilson::mult_tp
void mult_tp(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:1029
AFopr_Wilson::real_t
AFIELD::real_t real_t
Definition: afopr_Wilson.h:43
ND
#define ND
Definition: field_F_imp_SU2-inc.h:5
AFopr_Wilson::mult_ym
void mult_ym(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:824
Parameters::set_int_vector
void set_int_vector(const string &key, const vector< int > &value)
Definition: parameters.cpp:45
AFopr_Wilson::D
void D(AFIELD &, const AFIELD &)
Definition: afopr_Wilson-tmpl.h:408
AFopr_Wilson::set_config_omp
void set_config_omp(Field *u)
setting gauge configuration (setting omp parallel).
Definition: afopr_Wilson-tmpl.h:250
VLENY
#define VLENY
Definition: bridgeQXS_Clover_coarse_double.cpp:14
Field::ptr
const double * ptr(const int jin, const int site, const int jex) const
Definition: field.h:153
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
NVC
#define NVC
Definition: fopr_Wilson_impl_SU2-inc.h:15
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition: commonParameters.h:122
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
AFopr_Wilson::set_config_impl
void set_config_impl(Field *u)
setting gauge configuration (implementation).
Definition: afopr_Wilson-tmpl.h:263
AFopr_Wilson::tidyup
void tidyup()
final tidy-up.
Definition: afopr_Wilson-tmpl.h:159
VLENX
#define VLENX
Definition: bridgeQXS_Clover_coarse_double.cpp:13
Parameters::fetch_string
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
Parameters::fetch_double
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
AFopr_Wilson::flop_count
double flop_count()
returns floating operation counts.
Definition: afopr_Wilson.h:127
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
AFopr_Wilson::get_mode
std::string get_mode() const
returns mult mode.
Definition: afopr_Wilson-tmpl.h:362
Field
Container of Field-type object.
Definition: field.h:46
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253
AFopr_Wilson::mult
void mult(AFIELD &, const AFIELD &)
multiplies fermion operator to a given field.
Definition: afopr_Wilson-tmpl.h:370
ND2
#define ND2
Definition: define_params_SU3.h:18
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
ThreadManager::assert_single_thread
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
Definition: threadManager.cpp:372
AFopr_Wilson::mult_zp
void mult_zp(real_t *, real_t *)
Definition: afopr_Wilson-tmpl.h:898
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Bridge::BridgeIO::get_verbose_level
static std::string get_verbose_level(const VerboseLevel vl)
Definition: bridgeIO.cpp:154
convert_spinor
void convert_spinor(INDEX &index, FIELD &v, const Field &w)
Definition: afield-inc.h:187