ScalarBase

Trait ScalarBase 

Source
pub trait ScalarBase:
    Copy
    + Send
    + Sync
    + Mul<Output = Self>
    + Add<Output = Self>
    + Zero
    + One
    + PartialEq { }
Expand description

Shared trait bounds for all element types usable with einsum, independent of GEMM backend.

Unlike the previous design, ScalarBase does not require ElementOpApply. This allows custom scalar types (e.g., tropical semiring types) to satisfy einsum bounds without implementing conj/transpose/adjoint.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ScalarBase for T
where T: Copy + Send + Sync + Mul<Output = T> + Add<Output = T> + Zero + One + PartialEq,