pub struct GpuStorage { /* private fields */ }Expand description
GPU tensor storage implementation (legacy - kept for compatibility)
Trait Implementations§
Source§impl Debug for GpuStorage
impl Debug for GpuStorage
impl Send for GpuStorage
impl Sync for GpuStorage
Source§impl TensorStorage for GpuStorage
impl TensorStorage for GpuStorage
Source§fn data_ptr_mut(&mut self) -> *mut u8
fn data_ptr_mut(&mut self) -> *mut u8
Get mutable data pointer (for unsafe operations)
Source§fn size_bytes(&self) -> usize
fn size_bytes(&self) -> usize
Get data size in bytes
Source§fn to_device(&self, device: &Device) -> Result<Arc<dyn TensorStorage>>
fn to_device(&self, device: &Device) -> Result<Arc<dyn TensorStorage>>
Copy data to another device
Source§fn clone_storage(&self) -> Arc<dyn TensorStorage> ⓘ
fn clone_storage(&self) -> Arc<dyn TensorStorage> ⓘ
Clone the storage
Source§fn as_candle_tensor(&self) -> Option<&CandleTensor>
fn as_candle_tensor(&self) -> Option<&CandleTensor>
Try to get the underlying Candle tensor (if this is CandleStorage)
Auto Trait Implementations§
impl Freeze for GpuStorage
impl RefUnwindSafe for GpuStorage
impl Unpin for GpuStorage
impl UnsafeUnpin for GpuStorage
impl UnwindSafe for GpuStorage
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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