Skip to main content

DevicePtrMut

Trait DevicePtrMut 

pub trait DevicePtrMut<T>: DeviceSlice<T> {
    // Required method
    fn device_ptr_mut<'a>(
        &'a mut self,
        stream: &'a CudaStream,
    ) -> (u64, SyncOnDrop<'a>);
}
Expand description

Abstraction over CudaSlice/CudaViewMut

Required Methods§

fn device_ptr_mut<'a>( &'a mut self, stream: &'a CudaStream, ) -> (u64, SyncOnDrop<'a>)

Retrieve the device pointer with the intent to modify the device memory associated with it.

Implementations of this method should ensure stream waits for any previous reads/writes of this memory before continuing.

The [SyncOnDrop] item of the return tuple should be dropped after the write of the sys::CUdeviceptr is scheduled.

In most cases you can use like:

let (src, _record_src) = src.device_ptr_mut(&stream);

Which will drop the [SyncOnDrop] at the end of the scope.

Implementors§

Source§

impl DevicePtrMut<u8> for CudaColumn

§

impl<T> DevicePtrMut<T> for CudaSlice<T>

§

impl<T> DevicePtrMut<T> for CudaViewMut<'_, T>

§

impl<T> DevicePtrMut<T> for UnifiedSlice<T>

§

impl<T> DevicePtrMut<T> for UnifiedViewMut<'_, T>

Source§

impl<T: DeviceRepr> DevicePtrMut<T> for TrackedCudaSlice<T>