pub trait LaunchableMem {
    type Item;
    fn as_launchable_ptr(&self) -> LaunchablePtr<Self::Item>;
fn as_launchable_slice(&self) -> LaunchableSlice<'_, Self::Item>;
fn as_launchable_mut_ptr(&mut self) -> LaunchableMutPtr<Self::Item>;
fn as_launchable_mut_slice(&mut self) -> LaunchableMutSlice<'_, Self::Item>; }
Expand description

GPU-accessible memory.

By implementing LaunchableMem for a type, you specify that the memory can be directly accessed on the GPU.

Associated Types

The type of elements stored in the memory range.

Required methods

Returns a launchable pointer to the beginning of the memory range.

Returns a launchable slice to the entire memory range.

Returns a launchable mutable pointer to the beginning of the memory range.

Returns a launchable mutable slice to the entire memory range.

Implementations on Foreign Types

Directly derefencing a main-memory slice on the GPU requires that the GPU has cache-coherent access to main-memory. For example, on POWER9 and Tesla V100 with NVLink 2.0.

On non-cache-coherent GPUs, derefencing main-memory will lead to a segmentation fault!

Implementors