pub trait NormalBinOps<RHS = Self>{
type Output;
type OutputMeta: CommonBounds;
type InplaceOutput;
// Required methods
fn add_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>
where U: BorrowMut<Self::InplaceOutput>;
fn sub_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>
where U: BorrowMut<Self::InplaceOutput>;
fn mul_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>
where U: BorrowMut<Self::InplaceOutput>;
fn rem_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>
where U: BorrowMut<Self::InplaceOutput>;
}Expand description
A trait for binary operations on tensors.
Required Associated Types§
Sourcetype OutputMeta: CommonBounds
type OutputMeta: CommonBounds
The output tensor data type.
Sourcetype InplaceOutput
type InplaceOutput
The inplace output tensor type.
Required Methods§
Sourcefn add_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
fn add_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
Sourcefn sub_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
fn sub_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
Sourcefn mul_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
fn mul_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
Sourcefn rem_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
fn rem_<U>(&self, rhs: RHS, out: U) -> Result<Self::Output, TensorError>where
U: BorrowMut<Self::InplaceOutput>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".