TensorDeviceChangeAPI

Trait TensorDeviceChangeAPI 

Source
pub trait TensorDeviceChangeAPI<'l, BOut>
where BOut: DeviceRawAPI<Self::Type>,
{ type Repr; type ReprTo; type Type; type Dim: DimAPI; // Required methods fn change_device_f( self, device: &BOut, ) -> Result<TensorBase<Storage<Self::Repr, Self::Type, BOut>, Self::Dim>, Error>; fn into_device_f( self, device: &BOut, ) -> Result<TensorBase<Storage<DataOwned<<BOut as DeviceRawAPI<Self::Type>>::Raw>, Self::Type, BOut>, Self::Dim>, Error>; fn to_device_f( &'l self, device: &BOut, ) -> Result<TensorBase<Storage<Self::ReprTo, Self::Type, BOut>, Self::Dim>, Error>; // Provided methods fn change_device( self, device: &BOut, ) -> TensorBase<Storage<Self::Repr, Self::Type, BOut>, Self::Dim> where Self: Sized { ... } fn into_device( self, device: &BOut, ) -> TensorBase<Storage<DataOwned<<BOut as DeviceRawAPI<Self::Type>>::Raw>, Self::Type, BOut>, Self::Dim> where Self: Sized { ... } fn to_device( &'l self, device: &BOut, ) -> TensorBase<Storage<Self::ReprTo, Self::Type, BOut>, Self::Dim> { ... } }

Required Associated Types§

Required Methods§

Source

fn change_device_f( self, device: &BOut, ) -> Result<TensorBase<Storage<Self::Repr, Self::Type, BOut>, Self::Dim>, Error>

Source

fn into_device_f( self, device: &BOut, ) -> Result<TensorBase<Storage<DataOwned<<BOut as DeviceRawAPI<Self::Type>>::Raw>, Self::Type, BOut>, Self::Dim>, Error>

Source

fn to_device_f( &'l self, device: &BOut, ) -> Result<TensorBase<Storage<Self::ReprTo, Self::Type, BOut>, Self::Dim>, Error>

Provided Methods§

Source

fn change_device( self, device: &BOut, ) -> TensorBase<Storage<Self::Repr, Self::Type, BOut>, Self::Dim>
where Self: Sized,

Source

fn into_device( self, device: &BOut, ) -> TensorBase<Storage<DataOwned<<BOut as DeviceRawAPI<Self::Type>>::Raw>, Self::Type, BOut>, Self::Dim>
where Self: Sized,

Source

fn to_device( &'l self, device: &BOut, ) -> TensorBase<Storage<Self::ReprTo, Self::Type, BOut>, Self::Dim>

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.

Implementors§

Source§

impl<'a, R, T, B, D, BOut> TensorDeviceChangeAPI<'a, BOut> for TensorBase<Storage<R, T, B>, D>
where B: DeviceRawAPI<T> + DeviceChangeAPI<'a, BOut, R, T, D>, BOut: DeviceRawAPI<T>, D: DimAPI, R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>,

Source§

type Repr = <B as DeviceChangeAPI<'a, BOut, R, T, D>>::Repr

Source§

type ReprTo = <B as DeviceChangeAPI<'a, BOut, R, T, D>>::ReprTo

Source§

type Type = T

Source§

type Dim = D