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