pub struct ByteBridge<Backends> { /* private fields */ }
Expand description
Simply transfers tensors between backends via the underlying tensor data.
Trait Implementations§
Source§impl<B1: BackendIr, B2: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2)>
impl<B1: BackendIr, B2: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2)>
Source§type TensorHandle = Handle<B1, B2>
type TensorHandle = Handle<B1, B2>
The type that can be used to point to a tensor of any kind.
Source§type Device = MultiDevice<B1, B2>
type Device = MultiDevice<B1, B2>
Device type used by the backends.
Source§fn change_backend_float(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_float( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given float tensor.
Source§fn change_backend_int(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_int( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given int tensor.
Source§fn change_backend_bool(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_bool( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given bool tensor.
Source§impl<B1: BackendIr, B2: BackendIr, B3: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2, B3)>
impl<B1: BackendIr, B2: BackendIr, B3: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2, B3)>
Source§type TensorHandle = Handle<B1, B2, B3>
type TensorHandle = Handle<B1, B2, B3>
The type that can be used to point to a tensor of any kind.
Source§type Device = MultiDevice<B1, B2, B3>
type Device = MultiDevice<B1, B2, B3>
Device type used by the backends.
Source§fn change_backend_float(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_float( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given float tensor.
Source§fn change_backend_int(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_int( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given int tensor.
Source§fn change_backend_bool(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_bool( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given bool tensor.
Source§impl<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2, B3, B4)>
impl<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> MultiBackendBridge for ByteBridge<(B1, B2, B3, B4)>
Source§type TensorHandle = Handle<B1, B2, B3, B4>
type TensorHandle = Handle<B1, B2, B3, B4>
The type that can be used to point to a tensor of any kind.
Source§type Device = MultiDevice<B1, B2, B3, B4>
type Device = MultiDevice<B1, B2, B3, B4>
Device type used by the backends.
Source§fn change_backend_float(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_float( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given float tensor.
Source§fn change_backend_int(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_int( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given int tensor.
Source§fn change_backend_bool(
tensor: Self::TensorHandle,
shape: Shape,
target_device: &Self::Device,
) -> Self::TensorHandle
fn change_backend_bool( tensor: Self::TensorHandle, shape: Shape, target_device: &Self::Device, ) -> Self::TensorHandle
Change the backend of the given bool tensor.
Auto Trait Implementations§
impl<Backends> Freeze for ByteBridge<Backends>
impl<Backends> RefUnwindSafe for ByteBridge<Backends>where
Backends: RefUnwindSafe,
impl<Backends> Send for ByteBridge<Backends>where
Backends: Send,
impl<Backends> Sync for ByteBridge<Backends>where
Backends: Sync,
impl<Backends> Unpin for ByteBridge<Backends>where
Backends: Unpin,
impl<Backends> UnwindSafe for ByteBridge<Backends>where
Backends: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more