pub struct Dispatcher;Expand description
The central routing engine for all mathematical operations.
Implementations§
Source§impl Dispatcher
impl Dispatcher
Sourcepub fn add(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
pub fn add(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
Dispatches an element-wise addition operation: out = a + b
Sourcepub fn mul(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
pub fn mul(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
Dispatches an element-wise multiplication operation: out = a * b
Sourcepub fn matmul(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
pub fn matmul(a: &Tensor, b: &Tensor) -> EtensorResult<Tensor>
Dispatches a matrix multiplication: out = a @ b
Sourcepub fn sum_all(a: &Tensor) -> EtensorResult<Tensor>
pub fn sum_all(a: &Tensor) -> EtensorResult<Tensor>
Dispatches a global sum reduction: out = sum(a)
Sourcepub fn relu(a: &Tensor) -> EtensorResult<Tensor>
pub fn relu(a: &Tensor) -> EtensorResult<Tensor>
Dispatches a ReLU activation: out = max(0, a)
Sourcepub fn sigmoid(a: &Tensor) -> EtensorResult<Tensor>
pub fn sigmoid(a: &Tensor) -> EtensorResult<Tensor>
Dispatches a Sigmoid activation: out = 1 / (1 + exp(-a))
Auto Trait Implementations§
impl Freeze for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnsafeUnpin for Dispatcher
impl UnwindSafe for Dispatcher
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