Skip to main content

TensorAnalytic

Trait TensorAnalytic 

Source
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§

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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§

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§