mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hopeefully fixed
This commit is contained in:
parent
73de335256
commit
1a74816c25
@ -230,16 +230,18 @@ public:
|
|||||||
result = source;
|
result = source;
|
||||||
int pc = processor_coor[dim];
|
int pc = processor_coor[dim];
|
||||||
for(int p=0;p<processors[dim];p++) {
|
for(int p=0;p<processors[dim];p++) {
|
||||||
autoView(r_v,result,CpuRead);
|
{
|
||||||
autoView(p_v,pgbuf,CpuWrite);
|
autoView(r_v,result,CpuRead);
|
||||||
thread_for(idx, sgrid->lSites(),{
|
autoView(p_v,pgbuf,CpuWrite);
|
||||||
|
thread_for(idx, sgrid->lSites(),{
|
||||||
Coordinate cbuf(Nd);
|
Coordinate cbuf(Nd);
|
||||||
sobj s;
|
sobj s;
|
||||||
sgrid->LocalIndexToLocalCoor(idx,cbuf);
|
sgrid->LocalIndexToLocalCoor(idx,cbuf);
|
||||||
peekLocalSite(s,r_v,cbuf);
|
peekLocalSite(s,r_v,cbuf);
|
||||||
cbuf[dim]+=((pc+p) % processors[dim])*L;
|
cbuf[dim]+=((pc+p) % processors[dim])*L;
|
||||||
pokeLocalSite(s,p_v,cbuf);
|
pokeLocalSite(s,p_v,cbuf);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (p != processors[dim] - 1) {
|
if (p != processors[dim] - 1) {
|
||||||
result = Cshift(result,dim,L);
|
result = Cshift(result,dim,L);
|
||||||
}
|
}
|
||||||
@ -268,15 +270,19 @@ public:
|
|||||||
flops+= flops_call*NN;
|
flops+= flops_call*NN;
|
||||||
|
|
||||||
// writing out result
|
// writing out result
|
||||||
thread_for(idx,sgrid->lSites(),{
|
{
|
||||||
|
autoView(pgbuf_v,pgbuf,CpuRead);
|
||||||
|
autoView(result_v,result,CpuWrite);
|
||||||
|
thread_for(idx,sgrid->lSites(),{
|
||||||
Coordinate clbuf(Nd), cgbuf(Nd);
|
Coordinate clbuf(Nd), cgbuf(Nd);
|
||||||
sobj s;
|
sobj s;
|
||||||
sgrid->LocalIndexToLocalCoor(idx,clbuf);
|
sgrid->LocalIndexToLocalCoor(idx,clbuf);
|
||||||
cgbuf = clbuf;
|
cgbuf = clbuf;
|
||||||
cgbuf[dim] = clbuf[dim]+L*pc;
|
cgbuf[dim] = clbuf[dim]+L*pc;
|
||||||
peekLocalSite(s,pgbuf,cgbuf);
|
peekLocalSite(s,pgbuf_v,cgbuf);
|
||||||
pokeLocalSite(s,result,clbuf);
|
pokeLocalSite(s,result_v,clbuf);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
result = result*div;
|
result = result*div;
|
||||||
|
|
||||||
// destroying plan
|
// destroying plan
|
||||||
|
Loading…
x
Reference in New Issue
Block a user