From bc7f60f78ecc82a4af1d94d4687e5c7a1b8a9ab8 Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Mon, 30 Sep 2019 09:11:29 -0700 Subject: More optimization for GPU --- Source/Particles/Sorting/SortingUtils.H | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Particles/Sorting/SortingUtils.H') diff --git a/Source/Particles/Sorting/SortingUtils.H b/Source/Particles/Sorting/SortingUtils.H index 76c143b09..1aaaf73a8 100644 --- a/Source/Particles/Sorting/SortingUtils.H +++ b/Source/Particles/Sorting/SortingUtils.H @@ -6,7 +6,7 @@ #include // TODO: Add documentation -void fillWithConsecutiveIntegers( amrex::Gpu::ManagedDeviceVector& v ) +void fillWithConsecutiveIntegers( amrex::Gpu::DeviceVector& v ) { #ifdef AMREX_USE_GPU // On GPU: Use thrust @@ -21,7 +21,7 @@ void fillWithConsecutiveIntegers( amrex::Gpu::ManagedDeviceVector& v ) template< typename ForwardIterator > ForwardIterator stablePartition(ForwardIterator index_begin, ForwardIterator index_end, - amrex::Gpu::ManagedDeviceVector& predicate) + amrex::Gpu::DeviceVector& predicate) { #ifdef AMREX_USE_GPU // On GPU: Use thrust @@ -59,7 +59,7 @@ class fillBufferFlag { public: fillBufferFlag( WarpXParIter& pti, const amrex::iMultiFab* bmasks, - amrex::Gpu::ManagedDeviceVector& inexflag, + amrex::Gpu::DeviceVector& inexflag, const amrex::Geometry& geom, long start_index=0 ) { // Extract simple structure that can be used directly on the GPU @@ -109,14 +109,14 @@ class copyAndReorder copyAndReorder( amrex::Gpu::ManagedDeviceVector& src, amrex::Gpu::ManagedDeviceVector& dst, - amrex::Gpu::ManagedDeviceVector& indices ) { + amrex::Gpu::DeviceVector& indices ) { // Extract simple structure that can be used directly on the GPU m_src_ptr = src.dataPtr(); m_dst_ptr = dst.dataPtr(); m_indices_ptr = indices.dataPtr(); }; - AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE + AMREX_GPU_DEVICE AMREX_FORCE_INLINE void operator()( const long ip ) const { m_dst_ptr[ip] = m_src_ptr[ m_indices_ptr[ip] ]; }; -- cgit v1.2.3