You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@hcedwar I put an issue after the discussion about packing a group of futures.
/// currently
struct block {
int m, n;
value_type *ptr;
future_type future;
};
view<block**> blocks;
doSomethingWithBlocks(blocks); // blocks(i,j).future has a handle for task.
// the whole blocks need to be dependent on another task
view<future_type*> deps("deps", blocks.m * blocks.n);
int k=0;
for (int i=0,k=0;i<blocks.m;++i)
for (int j=0;j<blocks.n;++j,++k)
deps[k] = blocks(i,j).future;
Kokkos::respawn( this, when_all(blocks.m*blocks.n, deps), Priority::Regular);
// this depedence mechanism do multipl copy of futures (internally copy the array again)
----------
// the following may reduce the overhead in this situation
auto deps = when_all(blocks.m*block);
int k=0;
for (int i=0,k=0;i<blocks.m;++i)
for (int j=0;j<blocks.n;++j,++k)
deps[k] = blocks(i,j).future;
Kokkos:respawn( this, deps, Priority::Regual );
The text was updated successfully, but these errors were encountered:
@hcedwar I put an issue after the discussion about packing a group of futures.
The text was updated successfully, but these errors were encountered: