pub trait TensorAnalytic {
Show 20 methods
// Required methods
fn exp(&mut self, input: &Tensor) -> Result<Tensor>;
fn log(&mut self, input: &Tensor) -> Result<Tensor>;
fn sin(&mut self, input: &Tensor) -> Result<Tensor>;
fn cos(&mut self, input: &Tensor) -> Result<Tensor>;
fn tanh(&mut self, input: &Tensor) -> Result<Tensor>;
fn sqrt(&mut self, input: &Tensor) -> Result<Tensor>;
fn rsqrt(&mut self, input: &Tensor) -> Result<Tensor>;
fn pow(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>;
fn expm1(&mut self, input: &Tensor) -> Result<Tensor>;
fn log1p(&mut self, input: &Tensor) -> Result<Tensor>;
// Provided methods
fn exp_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn log_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn sin_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn cos_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn tanh_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn sqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn pow_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor> { ... }
fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor> { ... }
}Expand description
Analytic unary and binary tensor operations.
§Examples
use tenferro_tensor::TensorAnalytic;
fn accepts_analytic<B: TensorAnalytic>(_backend: &mut B) {}Required Methods§
Sourcefn exp(&mut self, input: &Tensor) -> Result<Tensor>
fn exp(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn log(&mut self, input: &Tensor) -> Result<Tensor>
fn log(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn sin(&mut self, input: &Tensor) -> Result<Tensor>
fn sin(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn cos(&mut self, input: &Tensor) -> Result<Tensor>
fn cos(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn tanh(&mut self, input: &Tensor) -> Result<Tensor>
fn tanh(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn sqrt(&mut self, input: &Tensor) -> Result<Tensor>
fn sqrt(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn rsqrt(&mut self, input: &Tensor) -> Result<Tensor>
fn rsqrt(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn pow(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>
fn pow(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn expm1(&mut self, input: &Tensor) -> Result<Tensor>
fn expm1(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn log1p(&mut self, input: &Tensor) -> Result<Tensor>
fn log1p(&mut self, input: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Provided Methods§
Sourcefn exp_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn exp_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn log_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn log_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn sin_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn sin_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn cos_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn cos_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn tanh_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn tanh_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn sqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn sqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn pow_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor>
fn pow_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.