Modify 05_slice example to use DefaultExecutionSpace#677
Modify 05_slice example to use DefaultExecutionSpace#677dineshadepu wants to merge 1 commit intoECP-copa:masterfrom
Conversation
streeve
left a comment
There was a problem hiding this comment.
The code will need to be formatted - see https://github.com/ECP-copa/Cabana/blob/master/CONTRIBUTING.md for clang-format and pre-commit details
| using ExecutionSpace = Kokkos::DefaultHostExecutionSpace; | ||
| using ExecutionSpace = Kokkos::DefaultExecutionSpace; | ||
| using MemorySpace = typename ExecutionSpace::memory_space; | ||
| using DeviceType = Kokkos::Device<ExecutionSpace, MemorySpace>; |
There was a problem hiding this comment.
Just a note that #585 will change most of the examples to use memory_space directly - it may be best to wait until that is merged
There was a problem hiding this comment.
Sure, I will update the rest of the examples after #585 is merged. Will keep the PR open until then.
There was a problem hiding this comment.
@dineshadepu should be okay to continue this PR now that we've merged the blocking PR - let me know if those changes are confusing in any way. But I do not plan to include this in the imminent release, so feel free to wait until that's finished
| Cabana::AoSoA<DataTypes, DeviceType, VectorLength> aosoa( "my_aosoa", | ||
| num_tuple ); | ||
|
|
||
| // Create a mirror view of the aosoa on the host for accessing it legally |
There was a problem hiding this comment.
| // Create a mirror view of the aosoa on the host for accessing it legally | |
| // Create a mirror of the AoSoA on the host (this will not make a new copy if the memory is already allocated on the host, but will if it is in device memory) in order to print out the data. |
| We declare the memory space in which the AoSoA will be allocated | ||
| on the default execution space we are dealing with. |
There was a problem hiding this comment.
| We declare the memory space in which the AoSoA will be allocated | |
| on the default execution space we are dealing with. | |
| We create the AoSoA particle data in the memory space associated | |
| with the default execution space (see https://kokkos.github.io/kokkos-core-wiki/ProgrammingGuide/Initialization.html). |
Closes #624 .