10 #ifndef MULT_WILSON_OPENACC_INLINE_INCLUDED
11 #define MULT_WILSON_OPENACC_INLINE_INCLUDED
13 #define MULT_UV_R(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v0-u1*v1 + u2*v2-u3*v3 + u4*v4-u5*v5)
14 #define MULT_UV_I(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v1+u1*v0 + u2*v3+u3*v2 + u4*v5+u5*v4)
16 #define MULT_GXr(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v0-u1*v1 + u2*v2-u3*v3 + u4*v4-u5*v5)
17 #define MULT_GXi(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v1+u1*v0 + u2*v3+u3*v2 + u4*v5+u5*v4)
18 #define MULT_GDXr(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v0+u1*v1 + u2*v2+u3*v3 + u4*v4+u5*v5)
19 #define MULT_GDXi(u0,u1,u2,u3,u4,u5,v0,v1,v2,v3,v4,v5) (u0*v1-u1*v0 + u2*v3-u3*v2 + u4*v5-u5*v4)
21 #define EXT_IMG_R(v1r,v1i,v2r,v2i,w1r,w1i,w2r,w2i) (v1r*w2r - v1i*w2i - v2r*w1r + v2i*w1i)
22 #define EXT_IMG_I(v1r,v1i,v2r,v2i,w1r,w1i,w2r,w2i) (- v1r*w2i - v1i*w2r + v2r*w1i + v2i*w1r)
28 #ifdef SU3_3RD_ROW_RECONST
29 for(
int idf = 0; idf < 2*
NVC; ++idf){
30 ut[idf] = up[
IDX2(
NDF, idf, site)];
33 ut[12] =
EXT_IMG_R(ut[2], ut[3], ut[4], ut[5], ut[ 8], ut[ 9], ut[10], ut[11]);
34 ut[13] =
EXT_IMG_I(ut[2], ut[3], ut[4], ut[5], ut[ 8], ut[ 9], ut[10], ut[11]);
35 ut[14] =
EXT_IMG_R(ut[4], ut[5], ut[0], ut[1], ut[10], ut[11], ut[ 6], ut[ 7]);
36 ut[15] =
EXT_IMG_I(ut[4], ut[5], ut[0], ut[1], ut[10], ut[11], ut[ 6], ut[ 7]);
37 ut[16] =
EXT_IMG_R(ut[0], ut[1], ut[2], ut[3], ut[ 6], ut[ 7], ut[ 8], ut[ 9]);
38 ut[17] =
EXT_IMG_I(ut[0], ut[1], ut[2], ut[3], ut[ 6], ut[ 7], ut[ 8], ut[ 9]);
40 for(
int idf = 0; idf <
NDF; ++idf){
41 ut[idf] = up[
IDX2(
NDF, idf, site)];
68 for(
int ic = 0; ic <
NC; ++ic){
73 wt1r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
75 wt1i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
77 wt2r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
79 wt2i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
118 for(
int ic = 0; ic <
NC; ++ic){
123 wt1r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
124 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
125 wt1i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
126 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
127 wt2r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
128 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
129 wt2i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
130 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
165 for(
int ic = 0; ic <
NC; ++ic){
211 for(
int ic = 0; ic <
NC; ++ic){
215 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
218 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
221 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
224 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
235 for(
int ic = 0; ic <
NC; ++ic){
236 vt[
ID1 + 2*ic ] += wt1[2*ic];
237 vt[
ID1 + 2*ic+1] += wt1[2*ic+1];
238 vt[
ID2 + 2*ic ] += wt2[2*ic];
239 vt[
ID2 + 2*ic+1] += wt2[2*ic+1];
240 vt[
ID3 + 2*ic ] += -wt2[2*ic+1];
241 vt[
ID3 + 2*ic+1] += wt2[2*ic];
242 vt[
ID4 + 2*ic ] += -wt1[2*ic+1];
243 vt[
ID4 + 2*ic+1] += wt1[2*ic];
268 for(
int ic = 0; ic <
NC; ++ic){
273 wt1r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
275 wt1i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
277 wt2r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
279 wt2i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
318 for(
int ic = 0; ic <
NC; ++ic){
323 wt1r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
324 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
325 wt1i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
326 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
327 wt2r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
328 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
329 wt2i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
330 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
364 for(
int ic = 0; ic <
NC; ++ic){
410 for(
int ic = 0; ic <
NC; ++ic){
414 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
417 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
420 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
423 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
434 for(
int ic = 0; ic <
NC; ++ic){
435 vt[
ID1 + 2*ic ] += wt1[2*ic];
436 vt[
ID1 + 2*ic+1] += wt1[2*ic+1];
437 vt[
ID2 + 2*ic ] += wt2[2*ic];
438 vt[
ID2 + 2*ic+1] += wt2[2*ic+1];
439 vt[
ID3 + 2*ic ] += wt2[2*ic];
440 vt[
ID3 + 2*ic+1] += wt2[2*ic+1];
441 vt[
ID4 + 2*ic ] += -wt1[2*ic];
442 vt[
ID4 + 2*ic+1] += -wt1[2*ic+1];
467 for(
int ic = 0; ic <
NC; ++ic){
472 wt1r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
474 wt1i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
476 wt2r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
478 wt2i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
517 for(
int ic = 0; ic <
NC; ++ic){
522 wt1r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
523 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
524 wt1i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
525 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
526 wt2r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
527 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
528 wt2i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
529 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
563 for(
int ic = 0; ic <
NC; ++ic){
609 for(
int ic = 0; ic <
NC; ++ic){
613 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
616 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
619 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
622 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
633 for(
int ic = 0; ic <
NC; ++ic){
634 vt[
ID1 + 2*ic ] += wt1[2*ic];
635 vt[
ID1 + 2*ic+1] += wt1[2*ic+1];
636 vt[
ID2 + 2*ic ] += wt2[2*ic];
637 vt[
ID2 + 2*ic+1] += wt2[2*ic+1];
638 vt[
ID3 + 2*ic ] += -wt1[2*ic+1];
639 vt[
ID3 + 2*ic+1] += wt1[2*ic];
640 vt[
ID4 + 2*ic ] += wt2[2*ic+1];
641 vt[
ID4 + 2*ic+1] += -wt2[2*ic];
666 for(
int ic = 0; ic <
NC; ++ic){
671 wt1r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
673 wt1i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
675 wt2r =
MULT_GXr(up[0], up[1], up[2], up[3], up[4], up[5],
677 wt2i =
MULT_GXi(up[0], up[1], up[2], up[3], up[4], up[5],
691 vt[ 0] = 2.0 *
wt[
ID3 + 0];
692 vt[ 1] = 2.0 *
wt[
ID3 + 1];
693 vt[ 2] = 2.0 *
wt[
ID3 + 2];
694 vt[ 3] = 2.0 *
wt[
ID3 + 3];
695 vt[ 4] = 2.0 *
wt[
ID3 + 4];
696 vt[ 5] = 2.0 *
wt[
ID3 + 5];
698 vt[ 6] = 2.0 *
wt[
ID4 + 0];
699 vt[ 7] = 2.0 *
wt[
ID4 + 1];
700 vt[ 8] = 2.0 *
wt[
ID4 + 2];
701 vt[ 9] = 2.0 *
wt[
ID4 + 3];
702 vt[10] = 2.0 *
wt[
ID4 + 4];
703 vt[11] = 2.0 *
wt[
ID4 + 5];
712 for(
int ic = 0; ic <
NC; ++ic){
717 wt1r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
718 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
719 wt1i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
720 wt1[0], wt1[1], wt1[2], wt1[3], wt1[4], wt1[5]);
721 wt2r =
MULT_GXr( up[0], up[1], up[2], up[3], up[4], up[5],
722 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
723 wt2i =
MULT_GXi( up[0], up[1], up[2], up[3], up[4], up[5],
724 wt2[0], wt2[1], wt2[2], wt2[3], wt2[4], wt2[5]);
754 for(
int ic = 0; ic <
NC; ++ic){
796 for(
int ic = 0; ic <
NC; ++ic){
800 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
803 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
806 MULT_GDXr(up[0], up[1], up[6], up[7], up[12], up[13],
809 MULT_GDXi(up[0], up[1], up[6], up[7], up[12], up[13],
820 for(
int ic = 0; ic <
NC; ++ic){
821 vt[
ID1 + 2*ic ] += wt1[2*ic];
822 vt[
ID1 + 2*ic+1] += wt1[2*ic+1];
823 vt[
ID2 + 2*ic ] += wt2[2*ic];
824 vt[
ID2 + 2*ic+1] += wt2[2*ic+1];