mirror of
https://github.com/paboyle/Grid.git
synced 2025-12-02 20:34:44 +00:00
Compare commits
3 Commits
feature/fe
...
07acfe89f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07acfe89f2 | ||
| 40234f531f | |||
| d49694f38f |
@@ -456,9 +456,9 @@ template <class Fimpl>
|
|||||||
void FermToProp(typename Fimpl::PropagatorField &p, const typename Fimpl::FermionField &f, const int s, const int c)
|
void FermToProp(typename Fimpl::PropagatorField &p, const typename Fimpl::FermionField &f, const int s, const int c)
|
||||||
{
|
{
|
||||||
#ifdef FAST_FERM_TO_PROP
|
#ifdef FAST_FERM_TO_PROP
|
||||||
autoView(p_v,p,AcceleratorWrite);
|
autoView(p_v,p,CpuWrite);
|
||||||
autoView(f_v,f,AcceleratorRead);
|
autoView(f_v,f,CpuRead);
|
||||||
accelerator_for(idx,p_v.oSites(),1,{
|
thread_for(idx,p_v.oSites(),{
|
||||||
for(int ss = 0; ss < Ns; ++ss) {
|
for(int ss = 0; ss < Ns; ++ss) {
|
||||||
for(int cc = 0; cc < Fimpl::Dimension; ++cc) {
|
for(int cc = 0; cc < Fimpl::Dimension; ++cc) {
|
||||||
p_v[idx]()(ss,s)(cc,c) = f_v[idx]()(ss)(cc); // Propagator sink index is LEFT, suitable for left mult by gauge link (e.g.)
|
p_v[idx]()(ss,s)(cc,c) = f_v[idx]()(ss)(cc); // Propagator sink index is LEFT, suitable for left mult by gauge link (e.g.)
|
||||||
@@ -484,9 +484,9 @@ template <class Fimpl>
|
|||||||
void PropToFerm(typename Fimpl::FermionField &f, const typename Fimpl::PropagatorField &p, const int s, const int c)
|
void PropToFerm(typename Fimpl::FermionField &f, const typename Fimpl::PropagatorField &p, const int s, const int c)
|
||||||
{
|
{
|
||||||
#ifdef FAST_FERM_TO_PROP
|
#ifdef FAST_FERM_TO_PROP
|
||||||
autoView(p_v,p,AcceleratorWrite);
|
autoView(p_v,p,CpuRead);
|
||||||
autoView(f_v,f,AcceleratorRead);
|
autoView(f_v,f,CpuWrite);
|
||||||
accelerator_for(idx,p_v.oSites(),1,{
|
thread_for(idx,p_v.oSites(),{
|
||||||
for(int ss = 0; ss < Ns; ++ss) {
|
for(int ss = 0; ss < Ns; ++ss) {
|
||||||
for(int cc = 0; cc < Fimpl::Dimension; ++cc) {
|
for(int cc = 0; cc < Fimpl::Dimension; ++cc) {
|
||||||
f_v[idx]()(ss)(cc) = p_v[idx]()(ss,s)(cc,c); // LEFT index is copied across for s,c right index
|
f_v[idx]()(ss)(cc) = p_v[idx]()(ss,s)(cc,c); // LEFT index is copied across for s,c right index
|
||||||
|
|||||||
Reference in New Issue
Block a user