Struct dfdx::tensor::PhantomTensor
source · [−]pub struct PhantomTensor<T> { /* private fields */ }
Expand description
A fake tensor that holds a UniqueId and a type T
that is HasArrayType.
This is created and stored in GradientTape operations to access gradient data
for a tensor that the GradientTape doesn’t have ownership of.
Trait Implementations
sourceimpl<T: Clone> Clone for PhantomTensor<T>
impl<T: Clone> Clone for PhantomTensor<T>
sourcefn clone(&self) -> PhantomTensor<T>
fn clone(&self) -> PhantomTensor<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: HasArrayType> HasArrayType for PhantomTensor<T>
impl<T: HasArrayType> HasArrayType for PhantomTensor<T>
type Dtype = <T as HasArrayType>::Dtype
type Array = <T as HasArrayType>::Array
sourceimpl<T> HasUniqueId for PhantomTensor<T>
impl<T> HasUniqueId for PhantomTensor<T>
impl<T: Copy> Copy for PhantomTensor<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for PhantomTensor<T> where
T: RefUnwindSafe,
impl<T> !Send for PhantomTensor<T>
impl<T> !Sync for PhantomTensor<T>
impl<T> Unpin for PhantomTensor<T>
impl<T> UnwindSafe for PhantomTensor<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more