MemoryRegion

Trait MemoryRegion 

Source
pub trait MemoryRegion:
    Debug
    + Send
    + Sync {
    // Required methods
    unsafe fn as_ptr(&self) -> *const u8;
    fn size(&self) -> usize;
}
Expand description

A trait for storage types that can be used with NIXL

Required Methods§

Source

unsafe fn as_ptr(&self) -> *const u8

Get a raw pointer to the storage

§Safety

The caller must ensure:

  • The pointer is not used after the storage is dropped
  • Access patterns respect the storage’s thread safety model
Source

fn size(&self) -> usize

Returns the total size of the storage in bytes

Implementors§