pub struct ScalarTensor { /* private fields */ }Implementations§
Source§impl ScalarTensor
impl ScalarTensor
pub fn new(value: f64, dtype: DType, device: Device) -> Self
pub fn with_value(&self, value: f64) -> Self
pub fn alias_view(&self, storage_offset: usize) -> Result<Self, TensorMetaError>
pub fn set_in_place(&mut self, value: f64)
pub fn id(&self) -> u64
pub fn storage_id(&self) -> u64
pub fn value(&self) -> f64
pub fn meta(&self) -> &TensorMeta
pub fn version(&self) -> u64
pub fn evidence_fingerprint64(&self) -> u64
Trait Implementations§
Source§impl Clone for ScalarTensor
impl Clone for ScalarTensor
Source§fn clone(&self) -> ScalarTensor
fn clone(&self) -> ScalarTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScalarTensor
impl Debug for ScalarTensor
Source§impl PartialEq for ScalarTensor
impl PartialEq for ScalarTensor
impl StructuralPartialEq for ScalarTensor
Auto Trait Implementations§
impl Freeze for ScalarTensor
impl RefUnwindSafe for ScalarTensor
impl Send for ScalarTensor
impl Sync for ScalarTensor
impl Unpin for ScalarTensor
impl UnsafeUnpin for ScalarTensor
impl UnwindSafe for ScalarTensor
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