| 9 | #include "SortingUtils.H" |
| 10 | |
| 11 | void fillWithConsecutiveIntegers( amrex::Gpu::DeviceVector<int>& v ) |
| 12 | { |
| 13 | #ifdef AMREX_USE_GPU |
| 14 | // On GPU: Use amrex |
| 15 | auto data = v.data(); |
| 16 | auto N = v.size(); |
| 17 | AMREX_FOR_1D( N, i, {data[i] = i;}); |
| 18 | #else |
| 19 | // On CPU: Use std library |
| 20 | std::iota( v.begin(), v.end(), 0L ); |
| 21 | #endif |
| 22 | } |
no test coverage detected