1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-21 01:25:48 +01:00
Grid/lib/qcd/action/fermion/WilsonKernelsAsmBody.h

178 lines
4.5 KiB
C
Raw Normal View History

2016-06-03 11:24:26 +01:00
{
int locala,perma, ptypea;
int localb,permb, ptypeb;
int localc,permc, ptypec;
uint64_t basea, baseb, basec;
2016-06-03 11:24:26 +01:00
const uint64_t plocal =(uint64_t) & in._odata[0];
// vComplexF isigns[2] = { signs[0], signs[1] };
vComplexF *isigns = &signs[0];
MASK_REGS;
for(int site=0;site<Ns;site++) {
int sU =lo.Reorder(ssU);
for(int s=0;s<Ls;s++) {
ss =sU*Ls+s;
2016-06-03 11:24:26 +01:00
////////////////////////////////
// Xp
////////////////////////////////
int ent=ss*8;// 2*Ndim
basea = st.GetInfo(ptypea,locala,perma,Xp,ent,plocal); ent++;
PREFETCH1_CHIMU(basea);
PF_GAUGE(Xp);
2016-06-03 11:24:26 +01:00
baseb = st.GetInfo(ptypeb,localb,permb,Yp,ent,plocal); ent++;
PREFETCH_CHIMU(baseb);
basec = st.GetInfo(ptypec,localc,permc,Zp,ent,plocal); ent++;
PREFETCH_CHIMU(basec);
2016-06-03 11:24:26 +01:00
if ( locala ) {
LOAD64(%r10,isigns);
XM_PROJMEM(basea);
MAYBEPERM(PERMUTE_DIR3,perma);
} else {
LOAD_CHI(basea);
}
{
MULT_2SPIN_DIR_PFXP(Xp,baseb);
}
LOAD64(%r10,isigns);
XM_RECON;
////////////////////////////////
// Yp
////////////////////////////////
basea = st.GetInfo(ptypea,locala,perma,Tp,ent,plocal); ent++;
PREFETCH_CHIMU(basea);
2016-06-03 11:24:26 +01:00
if ( localb ) {
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
YM_PROJMEM(baseb);
MAYBEPERM(PERMUTE_DIR2,permb);
} else {
LOAD_CHI(baseb);
}
{
MULT_2SPIN_DIR_PFYP(Yp,basec);
2016-06-03 11:24:26 +01:00
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
YM_RECON_ACCUM;
////////////////////////////////
// Zp
////////////////////////////////
baseb = st.GetInfo(ptypeb,localb,permb,Xm,ent,plocal); ent++;
PREFETCH_CHIMU(baseb);
if ( localc ) {
2016-06-03 11:24:26 +01:00
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
ZM_PROJMEM(basec);
MAYBEPERM(PERMUTE_DIR1,permc);
2016-06-03 11:24:26 +01:00
} else {
LOAD_CHI(basec);
2016-06-03 11:24:26 +01:00
}
{
MULT_2SPIN_DIR_PFZP(Zp,basea);
2016-06-03 11:24:26 +01:00
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
ZM_RECON_ACCUM;
////////////////////////////////
// Tp
////////////////////////////////
basec = st.GetInfo(ptypec,localc,permc,Ym,ent,plocal); ent++;
PREFETCH_CHIMU(basec);
if ( locala ) {
2016-06-03 11:24:26 +01:00
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
TM_PROJMEM(basea);
MAYBEPERM(PERMUTE_DIR0,perma);
2016-06-03 11:24:26 +01:00
} else {
LOAD_CHI(basea);
2016-06-03 11:24:26 +01:00
}
{
MULT_2SPIN_DIR_PFTP(Tp,baseb);
2016-06-03 11:24:26 +01:00
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
TM_RECON_ACCUM;
////////////////////////////////
// Xm
////////////////////////////////
basea = st.GetInfo(ptypea,locala,perma,Zm,ent,plocal); ent++;
PREFETCH_CHIMU(basea);
if ( localb ) {
2016-06-03 11:24:26 +01:00
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
XP_PROJMEM(baseb);
MAYBEPERM(PERMUTE_DIR3,permb);
2016-06-03 11:24:26 +01:00
} else {
LOAD_CHI(baseb);
2016-06-03 11:24:26 +01:00
}
{
MULT_2SPIN_DIR_PFXM(Xm,basec);
2016-06-03 11:24:26 +01:00
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
XP_RECON_ACCUM;
////////////////////////////////
// Ym
////////////////////////////////
baseb = st.GetInfo(ptypeb,localb,permb,Tm,ent,plocal); ent++;
PREFETCH_CHIMU(baseb);
if ( localc ) {
2016-06-03 11:24:26 +01:00
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
YP_PROJMEM(basec);
MAYBEPERM(PERMUTE_DIR2,permc);
2016-06-03 11:24:26 +01:00
} else {
LOAD_CHI(basec);
2016-06-03 11:24:26 +01:00
}
{
MULT_2SPIN_DIR_PFYM(Ym,basea);
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
YP_RECON_ACCUM;
////////////////////////////////
// Zm
////////////////////////////////
basec = (uint64_t)&out._odata[ss];
PREFETCH_CHIMU(basec);
2016-06-03 11:24:26 +01:00
if ( locala ) {
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
ZP_PROJMEM(basea);
MAYBEPERM(PERMUTE_DIR1,perma);
} else {
LOAD_CHI(basea);
}
{
MULT_2SPIN_DIR_PFZM(Zm,baseb);
}
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
ZP_RECON_ACCUM;
////////////////////////////////
// Tm
////////////////////////////////
// basea = st.GetInfo(ptypea,locala,perma,Xp,ent,plocal); ent++;
// PREFETCH_CHIMU(basea);
2016-06-03 11:24:26 +01:00
if ( localb ) {
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
TP_PROJMEM(baseb);
MAYBEPERM(PERMUTE_DIR0,permb);
} else {
LOAD_CHI(baseb);
}
{
MULT_2SPIN_DIR_PFTM(Tm,basec);
2016-06-03 11:24:26 +01:00
}
// baseb = st.GetInfo(ptypeb,localb,permb,Yp,ent,plocal); ent++;
2016-06-03 11:24:26 +01:00
LOAD64(%r10,isigns); // times i => shuffle and xor the real part sign bit
TP_RECON_ACCUM;
SAVE_RESULT(&out._odata[ss],basec);
}
ssU++;
}
2016-06-03 11:24:26 +01:00
}