-
Notifications
You must be signed in to change notification settings - Fork 50
Grid Parallel
Sam Reeve edited this page Sep 12, 2024
·
2 revisions
Cabana::Grid provides capabilities for parallel iteration over structured grids which directly use linear and multi-dimensional Kokkos::parallel_for
for Cabana::Grid::grid_parallel_for
.
auto array = Cabana::Grid::createArray<double, device_type>( "label", node_layout );
auto array_view = array->view();
Cabana::Grid::grid_parallel_for(
"local_grid_for", exec_space(), *local_grid, Cabana::Grid::Own(),
Cabana::Grid::Cell(), KOKKOS_LAMBDA( const int i, const int j, const int k ) {
for ( int l = 0; l < 4; ++l )
array_view( i, j, k, l ) = 1.0;
} );
This is part of the Programming Guide series
Cabana - A Co-Designed Library for Exascale Particle Simulations