pub unsafe trait NDAllocator: 'static {
const MIN_ALIGN: usize;
// Required methods
unsafe fn alloc_data(&mut self, prototype: &DLTensor) -> *mut c_void;
unsafe fn free_data(&mut self, tensor: &DLTensor);
}
Expand description
Trait for n-dimensional array allocators
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.