pub trait DeviceChangeAPI<'l, BOut, R, T, D>{
type Repr: DataAPI<Data = BOut::Raw>;
type ReprTo: DataAPI<Data = BOut::Raw>;
// Required methods
fn change_device(
tensor: TensorAny<R, T, Self, D>,
device: &BOut,
) -> Result<TensorAny<Self::Repr, T, BOut, D>>;
fn into_device(
tensor: TensorAny<R, T, Self, D>,
device: &BOut,
) -> Result<TensorAny<DataOwned<BOut::Raw>, T, BOut, D>>;
fn to_device(
tensor: &'l TensorAny<R, T, Self, D>,
device: &BOut,
) -> Result<TensorAny<Self::ReprTo, T, BOut, D>>;
}Required Associated Types§
Required Methods§
fn change_device( tensor: TensorAny<R, T, Self, D>, device: &BOut, ) -> Result<TensorAny<Self::Repr, T, BOut, D>>
fn into_device( tensor: TensorAny<R, T, Self, D>, device: &BOut, ) -> Result<TensorAny<DataOwned<BOut::Raw>, T, BOut, D>>
fn to_device( tensor: &'l TensorAny<R, T, Self, D>, device: &BOut, ) -> Result<TensorAny<Self::ReprTo, T, BOut, D>>
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.