30 #ifndef HIPCUB_CUB_UTIL_ALLOCATOR_HPP_
31 #define HIPCUB_CUB_UTIL_ALLOCATOR_HPP_
33 #if defined(HIPCUB_STDERR) && !defined(CUB_STDERR)
37 #include "../../config.hpp"
39 #include <cub/util_allocator.cuh>
41 BEGIN_HIPCUB_NAMESPACE
45 hipError_t SetMaxCachedBytes(
46 size_t max_cached_bytes)
48 return hipCUDAErrorTohipError(
49 ::cub::CachingDeviceAllocator::SetMaxCachedBytes(max_cached_bytes)
53 hipError_t DeviceAllocate(
57 hipStream_t active_stream = 0)
59 return hipCUDAErrorTohipError(
60 ::cub::CachingDeviceAllocator::DeviceAllocate(device, d_ptr, bytes, active_stream)
64 hipError_t DeviceAllocate(
67 hipStream_t active_stream = 0)
69 return hipCUDAErrorTohipError(
70 ::cub::CachingDeviceAllocator::DeviceAllocate(d_ptr, bytes, active_stream)
74 hipError_t DeviceFree(
78 return hipCUDAErrorTohipError(
79 ::cub::CachingDeviceAllocator::DeviceFree(device, d_ptr)
83 hipError_t DeviceFree(
86 return hipCUDAErrorTohipError(
87 ::cub::CachingDeviceAllocator::DeviceFree(d_ptr)
91 hipError_t FreeAllCached()
93 return hipCUDAErrorTohipError(
94 ::cub::CachingDeviceAllocator::FreeAllCached()
Definition: util_allocator.hpp:44