Skip to main content

DevicePtr

Trait DevicePtr 

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

Abstraction over CudaSlice/CudaView

Required Methods§

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

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

Implementations of this method should ensure stream waits for any previous writes of this memory before continuing (do not need to wait for any previous reads).

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

In most cases you can use like:

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

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

Implementors§

Source§

impl DevicePtr<u8> for CudaColumn

§

impl DevicePtr<u8> for MappedBuffer

§

impl<T> DevicePtr<T> for CudaSlice<T>

§

impl<T> DevicePtr<T> for CudaView<'_, T>

§

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

§

impl<T> DevicePtr<T> for UnifiedSlice<T>

§

impl<T> DevicePtr<T> for UnifiedView<'_, T>

§

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

Source§

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