pub struct Scirs2Exec32 {
pub tensors: HashMap<String, Scirs2Tensor32>,
}Expand description
SciRS2-backed executor operating in f32 precision.
This executor mirrors Scirs2Exec but uses ArrayD<f32> for all tensor
storage and computation, providing 50% memory savings compared to f64
at the cost of reduced numerical precision.
Fields§
§tensors: HashMap<String, Scirs2Tensor32>Implementations§
Source§impl Scirs2Exec32
impl Scirs2Exec32
Sourcepub fn add_tensor(&mut self, name: impl Into<String>, tensor: Scirs2Tensor32)
pub fn add_tensor(&mut self, name: impl Into<String>, tensor: Scirs2Tensor32)
Insert a named tensor into the executor’s store.
Sourcepub fn get_tensor(&self, name: &str) -> Option<&Scirs2Tensor32>
pub fn get_tensor(&self, name: &str) -> Option<&Scirs2Tensor32>
Retrieve a reference to a named tensor.
Trait Implementations§
Source§impl Default for Scirs2Exec32
impl Default for Scirs2Exec32
Source§impl TlExecutor for Scirs2Exec32
impl TlExecutor for Scirs2Exec32
type Tensor = ArrayBase<OwnedRepr<f32>, Dim<IxDynImpl>>
type Error = ExecutorError
Source§fn einsum(
&mut self,
spec: &str,
inputs: &[Self::Tensor],
) -> Result<Self::Tensor, Self::Error>
fn einsum( &mut self, spec: &str, inputs: &[Self::Tensor], ) -> Result<Self::Tensor, Self::Error>
Execute an einsum operation on input tensors.
Source§fn elem_op(
&mut self,
op: ElemOp,
x: &Self::Tensor,
) -> Result<Self::Tensor, Self::Error>
fn elem_op( &mut self, op: ElemOp, x: &Self::Tensor, ) -> Result<Self::Tensor, Self::Error>
Apply an element-wise unary operation.
Auto Trait Implementations§
impl Freeze for Scirs2Exec32
impl RefUnwindSafe for Scirs2Exec32
impl Send for Scirs2Exec32
impl Sync for Scirs2Exec32
impl Unpin for Scirs2Exec32
impl UnsafeUnpin for Scirs2Exec32
impl UnwindSafe for Scirs2Exec32
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
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