warp.Allocator#
- class warp.Allocator(*args, **kwargs)[source]#
Protocol for custom memory allocators.
Any object with
allocateanddeallocatemethods matching these signatures can be used as a Warp allocator.Methods
__init__(*args, **kwargs)allocate(size_in_bytes)Allocate memory and return a device pointer as an
int.deallocate(ptr, size_in_bytes)Free previously allocated memory.