mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
All axes can be used for comms now
This commit is contained in:
parent
3cc9947731
commit
91e2cf9b40
@ -95,13 +95,13 @@ void Gather_plane_exchange_table(Vector<std::pair<int,int> >& table,const Lattic
|
|||||||
int so = plane*rhs.Grid()->_ostride[dimension]; // base offset for start of plane
|
int so = plane*rhs.Grid()->_ostride[dimension]; // base offset for start of plane
|
||||||
|
|
||||||
auto rhs_v = rhs.View();
|
auto rhs_v = rhs.View();
|
||||||
accelerator_for(j, num, 1, {
|
auto p0=&pointers[0][0];
|
||||||
compress.CompressExchange(&pointers[0][0],
|
auto p1=&pointers[1][0];
|
||||||
&pointers[1][0],
|
auto tp=&table[0];
|
||||||
&rhs_v[0],
|
accelerator_forNB(j, num, 1, {
|
||||||
j,
|
compress.CompressExchange(p0,p1, &rhs_v[0], j,
|
||||||
so+table[2*j].second,
|
so+tp[2*j ].second,
|
||||||
so+table[2*j+1].second,
|
so+tp[2*j+1].second,
|
||||||
type);
|
type);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -570,19 +570,22 @@ public:
|
|||||||
|
|
||||||
mergetime-=usecond();
|
mergetime-=usecond();
|
||||||
for(int i=0;i<mm.size();i++){
|
for(int i=0;i<mm.size();i++){
|
||||||
thread_for(o,mm[i].buffer_size/2,{
|
auto mp = &mm[i].mpointer[0];
|
||||||
decompress.Exchange(mm[i].mpointer,
|
auto vp0= &mm[i].vpointers[0][0];
|
||||||
mm[i].vpointers[0],
|
auto vp1= &mm[i].vpointers[1][0];
|
||||||
mm[i].vpointers[1],
|
auto type= mm[i].type;
|
||||||
mm[i].type,o);
|
accelerator_forNB(o,mm[i].buffer_size/2,1,{
|
||||||
|
decompress.Exchange(mp,vp0,vp1,type,o);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
mergetime+=usecond();
|
mergetime+=usecond();
|
||||||
|
|
||||||
decompresstime-=usecond();
|
decompresstime-=usecond();
|
||||||
for(int i=0;i<dd.size();i++){
|
for(int i=0;i<dd.size();i++){
|
||||||
thread_for(o,dd[i].buffer_size,{
|
auto kp = dd[i].kernel_p;
|
||||||
decompress.Decompress(dd[i].kernel_p,dd[i].mpi_p,o);
|
auto mp = dd[i].mpi_p;
|
||||||
|
accelerator_forNB(o,dd[i].buffer_size,1,{
|
||||||
|
decompress.Decompress(kp,mp,o);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
decompresstime+=usecond();
|
decompresstime+=usecond();
|
||||||
@ -719,12 +722,13 @@ public:
|
|||||||
|
|
||||||
_grid->ShmBufferFreeAll();
|
_grid->ShmBufferFreeAll();
|
||||||
|
|
||||||
u_simd_send_buf.resize(Nsimd);
|
int maxl=2;
|
||||||
u_simd_recv_buf.resize(Nsimd);
|
u_simd_send_buf.resize(maxl);
|
||||||
|
u_simd_recv_buf.resize(maxl);
|
||||||
this->u_send_buf_p=(cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
this->u_send_buf_p=(cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
||||||
this->u_recv_buf_p=(cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
this->u_recv_buf_p=(cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
||||||
|
|
||||||
for(int l=0;l<2;l++){
|
for(int l=0;l<maxl;l++){
|
||||||
u_simd_recv_buf[l] = (cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
u_simd_recv_buf[l] = (cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
||||||
u_simd_send_buf[l] = (cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
u_simd_send_buf[l] = (cobj *)_grid->ShmBufferMalloc(_unified_buffer_size*sizeof(cobj));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user