diff --git a/src/utilities/_hypre_utilities.hpp b/src/utilities/_hypre_utilities.hpp index 9be4fc020..5e7b79eca 100644 --- a/src/utilities/_hypre_utilities.hpp +++ b/src/utilities/_hypre_utilities.hpp @@ -25,8 +25,7 @@ extern "C++" { #if defined(HYPRE_USING_CUDA) || defined(HYPRE_USING_HIP) -/* C++ style memory allocator for GPU **device** memory - * Just wraps _hypre_TAlloc and _hypre_TFree */ +/* C++ style memory allocator for the device using the abstract memory model */ struct hypre_device_allocator { typedef char value_type; @@ -43,12 +42,12 @@ struct hypre_device_allocator char *allocate(std::ptrdiff_t num_bytes) { - return _hypre_TAlloc(char, num_bytes, hypre_MEMORY_DEVICE); + return hypre_TAlloc(char, num_bytes, HYPRE_MEMORY_DEVICE); } void deallocate(char *ptr, size_t n) { - _hypre_TFree(ptr, hypre_MEMORY_DEVICE); + hypre_TFree(ptr, HYPRE_MEMORY_DEVICE); } }; diff --git a/src/utilities/device_allocator.h b/src/utilities/device_allocator.h index 1b030da1a..6740d035a 100644 --- a/src/utilities/device_allocator.h +++ b/src/utilities/device_allocator.h @@ -10,8 +10,7 @@ #if defined(HYPRE_USING_CUDA) || defined(HYPRE_USING_HIP) -/* C++ style memory allocator for GPU **device** memory - * Just wraps _hypre_TAlloc and _hypre_TFree */ +/* C++ style memory allocator for the device using the abstract memory model */ struct hypre_device_allocator { typedef char value_type; @@ -28,12 +27,12 @@ struct hypre_device_allocator char *allocate(std::ptrdiff_t num_bytes) { - return _hypre_TAlloc(char, num_bytes, hypre_MEMORY_DEVICE); + return hypre_TAlloc(char, num_bytes, HYPRE_MEMORY_DEVICE); } void deallocate(char *ptr, size_t n) { - _hypre_TFree(ptr, hypre_MEMORY_DEVICE); + hypre_TFree(ptr, HYPRE_MEMORY_DEVICE); } };