Skip to content

Commit

Permalink
Update sundials sycl memory helper interface (AMReX-Codes#2580)
Browse files Browse the repository at this point in the history
Update usage of the sundials sycl memory helper for sundials 6.x
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

gardner48 authored Jan 13, 2022
1 parent cde8e1c commit 5576188
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Src/Extern/SUNDIALS/AMReX_SUNMemory.cpp
Original file line number Diff line number Diff line change
@@ -106,24 +106,20 @@ namespace {

helper = SUNMemoryHelper_NewEmpty(*sunctx);

helper->content = NULL;
helper->content = NULL;
helper->ops->clone = CloneMemoryHelper;
helper->ops->alloc = Alloc;
helper->ops->dealloc = Dealloc;
helper->ops->destroy = DestroyMemoryHelper;
#if defined(AMREX_USE_HIP)
helper->ops->copy = SUNMemoryHelper_Copy_Hip;
helper->ops->copy = SUNMemoryHelper_Copy_Hip;
helper->ops->copyasync = SUNMemoryHelper_CopyAsync_Hip;
#elif defined(AMREX_USE_CUDA)
helper->ops->copy = SUNMemoryHelper_Copy_Cuda;
helper->ops->copy = SUNMemoryHelper_Copy_Cuda;
helper->ops->copyasync = SUNMemoryHelper_CopyAsync_Cuda;
#elif defined(AMREX_USE_DPCPP)
helper->ops->copy = SUNMemoryHelper_Copy_Sycl;
helper->ops->copy = SUNMemoryHelper_Copy_Sycl;
helper->ops->copyasync = SUNMemoryHelper_CopyAsync_Sycl;
helper->ops->clone = SUNMemoryHelper_Clone_Sycl;

// Attach the queue pointer as the content
helper->content = (void*) &amrex::Gpu::Device::streamQueue();
#endif

return helper;

0 comments on commit 5576188

Please sign in to comment.