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
Sam Reeve edited this page Sep 12, 2024
·
2 revisions
Overview
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( constint i, constint j, constint k ) {
for ( int l = 0; l < 4; ++l )
array_view( i, j, k, l ) = 1.0;
} );