Enum burn::tensor::repr::HandleKind
pub enum HandleKind<B>where
B: Backend,{
Float(<B as Backend>::FloatTensorPrimitive),
Int(<B as Backend>::IntTensorPrimitive),
Bool(<B as Backend>::BoolTensorPrimitive),
Quantized(<B as Backend>::QuantizedTensorPrimitive),
Empty,
}
Expand description
Handle which points to a backend tensor primitive kind.
Variants§
Float(<B as Backend>::FloatTensorPrimitive)
Float tensor handle.
Int(<B as Backend>::IntTensorPrimitive)
Int tensor handle.
Bool(<B as Backend>::BoolTensorPrimitive)
Bool tensor handle.
Quantized(<B as Backend>::QuantizedTensorPrimitive)
Quantized tensor handle.
Empty
Empty handle (used as a dummy representation).
Implementations§
§impl<B> HandleKind<B>where
B: Backend,
impl<B> HandleKind<B>where
B: Backend,
Trait Implementations§
§impl<B> Clone for HandleKind<B>where
B: Clone + Backend,
<B as Backend>::FloatTensorPrimitive: Clone,
<B as Backend>::IntTensorPrimitive: Clone,
<B as Backend>::BoolTensorPrimitive: Clone,
<B as Backend>::QuantizedTensorPrimitive: Clone,
impl<B> Clone for HandleKind<B>where
B: Clone + Backend,
<B as Backend>::FloatTensorPrimitive: Clone,
<B as Backend>::IntTensorPrimitive: Clone,
<B as Backend>::BoolTensorPrimitive: Clone,
<B as Backend>::QuantizedTensorPrimitive: Clone,
§fn clone(&self) -> HandleKind<B>
fn clone(&self) -> HandleKind<B>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<B> Debug for HandleKind<B>where
B: Debug + Backend,
<B as Backend>::FloatTensorPrimitive: Debug,
<B as Backend>::IntTensorPrimitive: Debug,
<B as Backend>::BoolTensorPrimitive: Debug,
<B as Backend>::QuantizedTensorPrimitive: Debug,
impl<B> Debug for HandleKind<B>where
B: Debug + Backend,
<B as Backend>::FloatTensorPrimitive: Debug,
<B as Backend>::IntTensorPrimitive: Debug,
<B as Backend>::BoolTensorPrimitive: Debug,
<B as Backend>::QuantizedTensorPrimitive: Debug,
Auto Trait Implementations§
impl<B> Freeze for HandleKind<B>where
<B as Backend>::FloatTensorPrimitive: Freeze,
<B as Backend>::IntTensorPrimitive: Freeze,
<B as Backend>::BoolTensorPrimitive: Freeze,
<B as Backend>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for HandleKind<B>where
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::IntTensorPrimitive: RefUnwindSafe,
<B as Backend>::BoolTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for HandleKind<B>
impl<B> Sync for HandleKind<B>
impl<B> Unpin for HandleKind<B>where
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::IntTensorPrimitive: Unpin,
<B as Backend>::BoolTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
impl<B> UnwindSafe for HandleKind<B>where
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::IntTensorPrimitive: UnwindSafe,
<B as Backend>::BoolTensorPrimitive: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more