mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 19:25:56 +01:00
FermToProp accelerator_for -> thread_for
This commit is contained in:
parent
d49694f38f
commit
40234f531f
@ -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,AcceleratorRead);
|
autoView(p_v,p,CpuRead);
|
||||||
autoView(f_v,f,AcceleratorWrite);
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user