Trait rust_cuda::kernel::CudaKernelParameter

source ·
pub trait CudaKernelParameter: Sealed {
    type SyncHostType;
    type AsyncHostType<'stream, 'b>
       where Self: 'b;
    type DeviceType<'b>
       where Self: 'b;

    // Required method
    fn with_new_async<'stream, 'b, O, E: From<CudaError>>(
        param: Self::SyncHostType,
        stream: Stream<'stream>,
        inner: impl FnOnce(Self::AsyncHostType<'stream, 'b>) -> Result<O, E>,
    ) -> Result<O, E>
       where Self: 'b;
}

Required Associated Types§

source

type SyncHostType

Available on crate feature host only.
source

type AsyncHostType<'stream, 'b> where Self: 'b

Available on crate feature host only.
source

type DeviceType<'b> where Self: 'b

Available on crate feature device only.

Required Methods§

source

fn with_new_async<'stream, 'b, O, E: From<CudaError>>( param: Self::SyncHostType, stream: Stream<'stream>, inner: impl FnOnce(Self::AsyncHostType<'stream, 'b>) -> Result<O, E>, ) -> Result<O, E>
where Self: 'b,

Available on crate feature host only.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T: 'static + PortableBitSemantics + TypeGraphLayout> CudaKernelParameter for &'a mut ThreadBlockSharedSlice<T>

§

type AsyncHostType<'stream, 'b> = &'b mut ThreadBlockSharedSlice<T> where Self: 'b

§

type DeviceType<'b> = &'b mut ThreadBlockSharedSlice<T> where Self: 'b

§

type SyncHostType = &'a mut ThreadBlockSharedSlice<T>

source§

impl<'a, T: 'static> CudaKernelParameter for &'a mut ThreadBlockShared<T>

§

type AsyncHostType<'stream, 'b> = &'b mut ThreadBlockShared<T> where Self: 'b

§

type DeviceType<'b> = &'b mut ThreadBlockShared<T> where Self: 'b

§

type SyncHostType = &'a mut ThreadBlockShared<T>

source§

impl<'a, T: Sync + RustToCuda + SafeMutableAliasing> CudaKernelParameter for &'a mut DeepPerThreadBorrow<T>

§

type AsyncHostType<'stream, 'b> = AsyncProj<'b, 'stream, HostAndDeviceMutRef<'b, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>> where Self: 'b

§

type DeviceType<'b> = &'b mut T where Self: 'b

§

type SyncHostType = &'a mut T

source§

impl<'a, T: Sync + RustToCuda + SafeMutableAliasing> CudaKernelParameter for &'a mut PtxJit<DeepPerThreadBorrow<T>>

§

type AsyncHostType<'stream, 'b> = <&'a mut DeepPerThreadBorrow<T> as CudaKernelParameter>::AsyncHostType<'stream, 'b> where Self: 'b

§

type DeviceType<'b> = <&'a mut DeepPerThreadBorrow<T> as CudaKernelParameter>::DeviceType<'b> where Self: 'b

§

type SyncHostType = <&'a mut DeepPerThreadBorrow<T> as CudaKernelParameter>::SyncHostType

source§

impl<'a, T: Sync + RustToCuda> CudaKernelParameter for &'a DeepPerThreadBorrow<T>

§

type AsyncHostType<'stream, 'b> = AsyncProj<'b, 'stream, HostAndDeviceConstRef<'b, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>> where Self: 'b

§

type DeviceType<'b> = &'b T where Self: 'b

§

type SyncHostType = &'a T

source§

impl<'a, T: Sync + RustToCuda> CudaKernelParameter for &'a PtxJit<DeepPerThreadBorrow<T>>

§

type AsyncHostType<'stream, 'b> = <&'a DeepPerThreadBorrow<T> as CudaKernelParameter>::AsyncHostType<'stream, 'b> where Self: 'b

§

type DeviceType<'b> = <&'a DeepPerThreadBorrow<T> as CudaKernelParameter>::DeviceType<'b> where Self: 'b

§

type SyncHostType = <&'a DeepPerThreadBorrow<T> as CudaKernelParameter>::SyncHostType

source§

impl<'a, T: Sync + StackOnly + PortableBitSemantics + TypeGraphLayout + InteriorMutableSync> CudaKernelParameter for &'a ShallowInteriorMutable<T>

§

type AsyncHostType<'stream, 'b> = AsyncProj<'b, 'stream, HostAndDeviceConstRef<'b, T>> where Self: 'b

§

type DeviceType<'b> = &'b T where Self: 'b

§

type SyncHostType = &'a mut T

source§

impl<'a, T: Sync + StackOnly + PortableBitSemantics + TypeGraphLayout> CudaKernelParameter for &'a PerThreadShallowCopy<T>

§

type AsyncHostType<'stream, 'b> = AsyncProj<'b, 'stream, HostAndDeviceConstRef<'b, T>> where Self: 'b

§

type DeviceType<'b> = &'b T where Self: 'b

§

type SyncHostType = &'a T

source§

impl<'a, T: Sync + StackOnly + PortableBitSemantics + TypeGraphLayout> CudaKernelParameter for &'a PtxJit<PerThreadShallowCopy<T>>

§

type AsyncHostType<'stream, 'b> = <&'a PerThreadShallowCopy<T> as CudaKernelParameter>::AsyncHostType<'stream, 'b> where Self: 'b

§

type DeviceType<'b> = <&'a PerThreadShallowCopy<T> as CudaKernelParameter>::DeviceType<'b> where Self: 'b

§

type SyncHostType = <&'a PerThreadShallowCopy<T> as CudaKernelParameter>::SyncHostType

source§

impl<T: Copy + Send + StackOnly + PortableBitSemantics + TypeGraphLayout> CudaKernelParameter for PerThreadShallowCopy<T>

§

type AsyncHostType<'stream, 'b> = T where Self: 'b

§

type DeviceType<'b> = T where Self: 'b

§

type SyncHostType = T

source§

impl<T: Send + Clone + RustToCuda<CudaRepresentation: StackOnly, CudaAllocation: EmptyCudaAlloc>> CudaKernelParameter for DeepPerThreadBorrow<T>

§

type AsyncHostType<'stream, 'b> = Async<'b, 'stream, HostAndDeviceOwned<'b, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>> where Self: 'b

§

type DeviceType<'b> = T where Self: 'b

§

type SyncHostType = T

source§

impl<T: Send + Clone + RustToCuda<CudaRepresentation: StackOnly, CudaAllocation: EmptyCudaAlloc>> CudaKernelParameter for PtxJit<DeepPerThreadBorrow<T>>