deregister_memory

deregister_memory#

stdgpu: stdgpu::deregister_memory
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ deregister_memory()

template<typename T >
void stdgpu::deregister_memory ( T *  p,
index64_t  n,
dynamic_memory_type  memory_type 
)

Deregisters the given memory block into the internal memory size manger.

Parameters
[in]pA pointer to the memory block
[in]nThe size of the memory block in bytes (must match the size during registration)
[in]memory_typeThe dynamic memory type of the memory block
Note
Automatically called by safe_device_allocator, safe_host_allocator, safe_managed_allocator
Only thread-safe if called before the memory block is actually freed