pub struct DummyTensor {
pub name: String,
pub shape: Vec<usize>,
pub data: Vec<f64>,
}Expand description
Minimal tensor implementation for testing and prototyping.
This is NOT meant for production use - it’s a placeholder for validating logic compilation and execution flow.
Fields§
§name: String§shape: Vec<usize>§data: Vec<f64>Implementations§
Source§impl DummyTensor
impl DummyTensor
pub fn new(name: impl Into<String>, shape: Vec<usize>) -> Self
pub fn with_data( name: impl Into<String>, shape: Vec<usize>, data: Vec<f64>, ) -> Self
pub fn size(&self) -> usize
pub fn zeros(name: impl Into<String>, shape: Vec<usize>) -> Self
pub fn ones(name: impl Into<String>, shape: Vec<usize>) -> Self
Trait Implementations§
Source§impl Clone for DummyTensor
impl Clone for DummyTensor
Source§fn clone(&self) -> DummyTensor
fn clone(&self) -> DummyTensor
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for DummyTensor
impl RefUnwindSafe for DummyTensor
impl Send for DummyTensor
impl Sync for DummyTensor
impl Unpin for DummyTensor
impl UnwindSafe for DummyTensor
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