pub trait HostToDev<T>: Sized + HostToDevPrivateSeal<T> {
// Provided method
fn convert(self) -> T { ... }
}Expand description
Expose the convert function to users. This trait is sealed to prevent arbitrary implementations. Only types that implement HostToDevPrivateSeal can implement this trait. This ensures that only safe conversions are allowed, ensuring safe host-to-device interface.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl<'a, 'b: 'a, T: ?Sized> HostToDev<&'a T> for &'a TensorView<'b, T>
Available on non-crate feature
codegen_tests only.Allow host-side &CudaMemBox<T> to device-side &T
impl<'a, 'b: 'a, T: ?Sized> HostToDev<GpuGlobal<'a, T>> for &'a mut TensorViewMut<'b, T>
Available on non-crate feature
codegen_tests only.Allow host-side T to device-side T