Struct nncombinator::cuda::mem::CachedTensor
source · [−]pub struct CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,{ /* private fields */ }Implementations
sourceimpl<U, T> CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
impl<U, T> CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
pub fn new(
value: T,
memory_pool: &Arc<Mutex<MemoryPool>>
) -> Result<CachedTensor<U, T>, CudaError>
pub fn scoped_mut<'a>(&'a mut self) -> ScopedMut<'a, U, T>
Trait Implementations
sourceimpl<U, T> AsPtr<U> for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
impl<U, T> AsPtr<U> for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
sourceimpl<U, T> AsVoidPtr for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
impl<U, T> AsVoidPtr for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
fn as_void_ptr(&self) -> *const c_void
sourceimpl<U, T> Deref for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
impl<U, T> Deref for CachedTensor<U, T>where
U: Debug + Default,
T: AsRawSlice<U>,
Auto Trait Implementations
impl<U, T> RefUnwindSafe for CachedTensor<U, T>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, T> !Send for CachedTensor<U, T>
impl<U, T> !Sync for CachedTensor<U, T>
impl<U, T> Unpin for CachedTensor<U, T>where
T: Unpin,
impl<U, T> UnwindSafe for CachedTensor<U, T>where
T: UnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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