pub struct Tensor<T, B: Backend = DefaultBackend> { /* private fields */ }Expand description
Allocated tensor data exposed through the public API.
Internally, a Tensor<T> is an Arc<TensorGraphEdge<T>>: a
reference-counted leaf node that carries the concrete TensorData<T>
(data buffer + Layout) and the unique ID that the execution planner uses
to track this value in the graph.
§Examples
use candela::Tensor;
// Fill every element with the same value.
let t = Tensor::from_scalar(1.0_f64, &[3, 3]);
assert_eq!(t.data().len(), 9);
// From an existing vec - total elements must equal the product of `shape`.
let t = Tensor::from_vec(vec![1.0_f64, 2.0, 3.0], &[3]);
assert_eq!(t.data(), &vec![1.0, 2.0, 3.0]);
// From any iterator.
let t = Tensor::from_iter([1.0_f64, 2.0, 3.0, 4.0], &[4]);
assert_eq!(t.data().len(), 4);
// Ops build a graph and run when you materialize.
let t = Tensor::from_scalar(3.0_f64, &[4]);
let result = (t * 2.0 + 1.0).materialize();
assert_eq!(result.data(), &vec![7.0; 4]);Implementations§
Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn view(
&self,
shape: &[usize],
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn view( &self, shape: &[usize], ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Reinterprets the tensor’s data as having shape shape without allocating.
The tensor must be contiguous and must have the same length as the original tensor.
Use .reshape() if the tensor may not be contiguous.
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[4.0, 3.0, 2.0, 1.0], &[4]);
// Shares the same underlying data as t
let v = t.view(&[2, 2]).unwrap().materialize();
assert_eq!(v.shape(), &[2, 2]);§Errors
Returns OpError::NonContiguousView if the tensor is not contiguous or OpError::InvalidViewShape if the shape is invalid.
Sourcepub fn reshape(
&self,
shape: &[usize],
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn reshape( &self, shape: &[usize], ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Reinterprets the tensor’s data as having shape shape,
allocating if the tensor is not contiguous.
Unlike .view(), this never fails on a non-contiguous
tensor — it only requires that the new shape has the same total number
of elements as the original.
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
let r = t.transpose().reshape(&[4]).unwrap().materialize();
assert_eq!(r.shape(), &[4]);
// r is contiguous as it was allocated in a new buffer.
assert!(r.is_contiguous());§Errors
Returns OpError::InvalidViewShape if shape does not have the same
total number of elements as the original.
Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn slice(
&self,
shape: &[SliceRange],
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn slice( &self, shape: &[SliceRange], ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Selects a rectangular subregion of the tensor, without allocating.
Each SliceRange picks a range along one axis, applied from the
outermost axis inward; axes you leave out are kept whole. Build the
ranges with the s! macro using ordinary range syntax — negative
bounds count from the end. The result is a view into the original buffer.
§Examples
use candela::{Tensor, Dimension, s};
let t = Tensor::from_slice(&[0.0, 1.0, 2.0, 3.0, 4.0, 5.0], &[2, 3]);
let sub = t.slice(s![1..2, 0..2]).unwrap().materialize(); // row 1, cols 0..2
assert_eq!(sub.shape(), &[1, 2]);§Errors
Returns OpError::AxesOutOfBounds if more ranges are given than the
tensor has axes, or OpError::SliceOutOfBounds if a range is empty.
Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn transpose(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn transpose(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Reverses the order of every axis, without allocating.
For a 2-D tensor this is the familiar matrix transpose; for higher
ranks it flips all axes at once (axis i becomes axis rank - 1 - i).
Only the layout changes — the data stays put until something forces a
copy, so reach for .as_contiguous() when you
need the transposed values in their own buffer. For an arbitrary
permutation, see .transpose_axes().
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);
let tt = t.transpose().materialize();
assert_eq!(tt.shape(), &[3, 2]);Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn transpose_axes(
&self,
axes: &[usize],
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn transpose_axes( &self, axes: &[usize], ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Reorders the axes by an explicit permutation, without allocating.
axes must list every axis index exactly once: transpose_axes(&[1, 0])
is the plain 2-D .transpose(), while &[0, 2, 1]
swaps only the last two axes of a rank-3 tensor and leaves the first
alone. Like .transpose() it only relabels the
layout — see .as_contiguous() to materialize
the reordered values.
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[0.0, 1.0, 2.0, 3.0, 4.0, 5.0], &[1, 2, 3]);
let s = t.transpose_axes(&[0, 2, 1]).unwrap().materialize();
assert_eq!(s.shape(), &[1, 3, 2]);§Errors
Returns OpError::NotEnoughAxes if axes doesn’t have one entry per
axis, or OpError::AxesOutOfBounds if an index is out of range or
repeated (so the list isn’t a valid permutation).
Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn as_contiguous(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn as_contiguous(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Packs the tensor into a fresh contiguous buffer in row-major order.
Layout-only ops like .transpose() and
.slice() leave the data where it is and only change
how it’s addressed. as_contiguous turns such a view back into a
densely laid-out tensor. If the input is already contiguous it costs
nothing — the call collapses to a no-op. Candela also inserts it
automatically wherever an op needs contiguous memory (a BLAS matmul, a
.reshape()), so you rarely call it by hand.
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
// transpose is a view; as_contiguous lays the transposed values out for real.
let c = t.transpose().as_contiguous().materialize();
assert!(c.is_contiguous());
assert_eq!(c.data(), &[1.0, 3.0, 2.0, 4.0]);Source§impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
impl<T, B> Tensor<T, B>where
T: Numeric,
B: Backend,
Sourcepub fn broadcast(
&self,
shape: &[usize],
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn broadcast( &self, shape: &[usize], ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Expands the tensor to a larger shape by repeating elements along new or size-1 axes, without allocating.
Broadcasting follows NumPy’s right-aligned rules: a target axis must either match the source or expand from size 1, and extra leading axes are added on the left. No data is copied — the repeated axes are faked with zero strides. The arithmetic operators broadcast on their own, so you mostly need this only to force a specific shape up front.
§Examples
use candela::{Tensor, Dimension};
let row = Tensor::from_slice(&[1.0, 2.0, 3.0], &[1, 3]);
let b = row.broadcast(&[2, 3]).unwrap().materialize();
assert_eq!(b.shape(), &[2, 3]);§Errors
Returns OpError::CannotBroadcast if the target shape has fewer axes
than the source, or an axis is neither equal to the source nor
expandable from 1.
Source§impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
Sourcepub fn ln(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn ln(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Computes the natural logarithm of each element.
Elements <= 0 follow the platform ln behavior: -inf at zero, NaN below.
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0_f64], &[1]);
assert_eq!(t.ln().materialize().data(), &[0.0]); // ln(1) == 0Source§impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
Sourcepub fn log2(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn log2(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Computes the base-2 logarithm of each element.
Elements <= 0 follow the platform log2 behavior: -inf at zero, NaN below.
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[8.0_f64], &[1]);
assert_eq!(t.log2().materialize().data(), &[3.0]); // log2(8) == 3Source§impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
Sourcepub fn relu(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn relu(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Applies the rectified linear unit (relu): max(x, 0.0) for each element.
§Examples
use candela::Tensor;
// Negative values clamp to zero; non-negative values pass through.
let t = Tensor::from_slice(&[-2.0_f64, -0.5, 0.0, 1.5], &[4]);
assert_eq!(t.relu().materialize().data(), &[0.0, 0.0, 0.0, 1.5]);Source§impl<T, B> Tensor<T, B>where
T: CanMatMul,
B: Backend,
impl<T, B> Tensor<T, B>where
T: CanMatMul,
B: Backend,
Sourcepub fn matmul<D>(
&self,
rhs: &D,
) -> Result<<Tensor<T, B> as BinaryResult<D, T, B>>::Output, OpError>where
D: Operand<T, B>,
Tensor<T, B>: BinaryResult<D, T, B>,
pub fn matmul<D>(
&self,
rhs: &D,
) -> Result<<Tensor<T, B> as BinaryResult<D, T, B>>::Output, OpError>where
D: Operand<T, B>,
Tensor<T, B>: BinaryResult<D, T, B>,
Matrix-multiplies, following NumPy’s matmul conventions.
For two 2-D tensors, it’s as one would expect: [m, k] @ [k, n]
gives [m, n], and the inner dimension k of both must agree.
Higher ranks (3-D, 4-D, and so on) are treated as batches of 2-D
matrices, broadcasting the leading axes where needed. So [b, m, k] @ [k, n]
gives [b, m, n], because it’s the same as doing [b, m, k] @ [b, k, n].
A 1-D operand is promoted to 2-D for the operation, then the added axis is dropped from the result:
[k] @ [k]contracts to a one-element tensor (a dot product).[k] @ [.., k, n]gives[.., n](vector times matrix).[.., m, k] @ [k]gives[.., m](matrix times vector).
§Examples
use candela::{Tensor, Dimension};
let a = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);
let b = Tensor::from_slice(&[1.0, 0.0, 0.0, 1.0, 1.0, 0.0], &[3, 2]);
let c = a.matmul(&b).unwrap().materialize();
assert_eq!(c.shape(), &[2, 2]);
assert_eq!(c.data(), &[4.0, 2.0, 10.0, 5.0]);A 1-D right-hand side contracts the last axis away:
use candela::{Tensor, Dimension};
let m = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
let v = Tensor::from_slice(&[1.0, 1.0], &[2]);
let r = m.matmul(&v).unwrap().materialize();
assert_eq!(r.shape(), &[2]);
assert_eq!(r.data(), &[3.0, 7.0]);§Errors
Returns OpError::CannotMatMul if the inner dimensions don’t agree, or
OpError::CannotBroadcast if the batch axes aren’t broadcast-compatible.
Source§impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
Sourcepub fn sum(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn sum(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Sums every element, producing a one-element tensor.
To reduce along a single axis instead, see
.sum_axis().
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
assert_eq!(t.sum().materialize().data(), &[10.0]);Source§impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
Sourcepub fn sum_axis(
&self,
axis: isize,
keep_dims: bool,
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn sum_axis( &self, axis: isize, keep_dims: bool, ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Sums along a single axis.
axis selects the axis to collapse and may be negative to count from
the end. With keep_dims = false that axis is removed from the shape;
with keep_dims = true it is kept as a size-1 axis, which leaves the
result broadcastable against the input. To reduce the whole tensor,
see .sum().
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);
let dropped = t.sum_axis(0, false).unwrap().materialize();
assert_eq!(dropped.shape(), &[3]);
assert_eq!(dropped.data(), &[5.0, 7.0, 9.0]);
// keep_dims = true leaves a size-1 axis in place.
let kept = t.sum_axis(0, true).unwrap().materialize();
assert_eq!(kept.shape(), &[1, 3]);§Errors
Returns OpError::AxesOutOfBounds if axis is outside the tensor’s rank.
Source§impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
Sourcepub fn max(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn max(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Returns the largest element, as a one-element tensor.
To take the maximum along a single axis instead, see
.max_axis().
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[3.0, 1.0, 4.0, 1.0, 5.0, 2.0], &[2, 3]);
assert_eq!(t.max().materialize().data(), &[5.0]);Source§impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> Tensor<T, B>where
T: NumericOp,
B: Backend,
Sourcepub fn max_axis(
&self,
axis: isize,
keep_dims: bool,
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn max_axis( &self, axis: isize, keep_dims: bool, ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Takes the maximum along a single axis.
axis and keep_dims behave exactly as in
.sum_axis(). To reduce the whole tensor, see
.max().
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[3.0, 1.0, 4.0, 1.0, 5.0, 2.0], &[2, 3]);
let m = t.max_axis(1, false).unwrap().materialize();
assert_eq!(m.shape(), &[2]);
assert_eq!(m.data(), &[4.0, 5.0]);§Errors
Returns OpError::AxesOutOfBounds if axis is outside the tensor’s rank.
Source§impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
Sourcepub fn mean(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
pub fn mean(&self) -> <Tensor<T, B> as UnaryResult<T, B>>::Output
Averages every element, producing a one-element tensor.
To average along a single axis instead, see
.mean_axis().
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
assert_eq!(t.mean().materialize().data(), &[2.5]);Source§impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
impl<T, B> Tensor<T, B>where
T: FloatLike,
B: Backend,
Sourcepub fn mean_axis(
&self,
axis: isize,
keep_dims: bool,
) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
pub fn mean_axis( &self, axis: isize, keep_dims: bool, ) -> Result<<Tensor<T, B> as UnaryResult<T, B>>::Output, OpError>
Averages along a single axis.
axis and keep_dims behave exactly as in
.sum_axis(). To average the whole tensor, see
.mean().
§Examples
use candela::{Tensor, Dimension};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);
let m = t.mean_axis(1, false).unwrap().materialize();
assert_eq!(m.shape(), &[2]);
assert_eq!(m.data(), &[2.0, 5.0]);§Errors
Returns OpError::AxesOutOfBounds if axis is outside the tensor’s rank.
Source§impl<T: ComputeFor<DefaultBackend>> Tensor<T>
impl<T: ComputeFor<DefaultBackend>> Tensor<T>
Sourcepub fn from_scalar(scalar: T, shape: &[usize]) -> Self
pub fn from_scalar(scalar: T, shape: &[usize]) -> Self
Create a tensor with every element set to scalar.
Sourcepub fn from_vec(vector: Vec<T>, shape: &[usize]) -> Self
pub fn from_vec(vector: Vec<T>, shape: &[usize]) -> Self
Create a tensor from vector interpreted with shape.
§Panics
Panics if vector length does not equal the product of shape.
Sourcepub fn from_slice(data: &[T], shape: &[usize]) -> Self
pub fn from_slice(data: &[T], shape: &[usize]) -> Self
Create a tensor by copying data into a buffer with the given shape.
§Panics
Panics if data length does not equal the product of shape.
Sourcepub fn from_iter<I>(iter: I, shape: &[usize]) -> Selfwhere
I: IntoIterator<Item = T>,
pub fn from_iter<I>(iter: I, shape: &[usize]) -> Selfwhere
I: IntoIterator<Item = T>,
Create a tensor by collecting iter into a buffer with the given shape.
§Panics
Panics if iter length does not equal the product of shape.
Source§impl<T: Clone, B: Backend> Tensor<T, B>
impl<T: Clone, B: Backend> Tensor<T, B>
Sourcepub fn data(&self) -> &[T]
pub fn data(&self) -> &[T]
Returns a reference to the underlying data buffer.
Slicing, transposition, etc will change the layout of the tensor so this is not guaranteed to be what you expect the tensor to logically contain.
Use .iter(), to iterate over the whole tensor following
logical order or .index() to access a single element by index.
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
assert_eq!(t.data(), &[1.0, 2.0, 3.0, 4.0]);Sourcepub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter(&self) -> Iter<'_, T> ⓘ
Iterate over the tensor’s elements in logical (row-major) order.
Unlike .data(), this follows the tensor’s layout, so a
sliced or transposed tensor yields its elements in the order its shape
implies.
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0, 2.0, 3.0], &[3]);
let collected: Vec<f64> = t.iter().copied().collect();
assert_eq!(collected, vec![1.0, 2.0, 3.0]);Sourcepub unsafe fn iter_as_layout<'a>(&'a self, layout: &'a Layout) -> Iter<'a, T> ⓘ
pub unsafe fn iter_as_layout<'a>(&'a self, layout: &'a Layout) -> Iter<'a, T> ⓘ
Iterate over the backing buffer using layout instead of this tensor’s own
layout. Useful for traversals more exotic than the safe interface exposes.
§Safety
layout must be a valid transformation of this tensor’s current layout -
every index it addresses must fall within the backing buffer. A layout
derived from this tensor’s layout (a view, slice, transpose, or broadcast
of it) upholds this; an unrelated layout may read out of bounds and is
undefined behaviour.
Sourcepub fn informed_iter(&self) -> InformedIter<'_, T> ⓘ
pub fn informed_iter(&self) -> InformedIter<'_, T> ⓘ
Walk the tensor depth-first, yielding a StepInfo for each element and
for each dimension boundary crossed along the way.
Unlike .iter(), which yields a flat stream of elements,
these events carry enough structure to reconstruct the tensor’s nesting.
The walk follows the logical layout, so a sliced or transposed tensor is
visited in the order its shape implies. It rebuilds that order one index
at a time and is not intended for hot paths. The
Display implementation is built on it.
§Examples
Regroup a flat buffer back into its rows - something .iter()
alone can’t do, because it never signals where one row ends and the next
begins:
use candela::{StepInfo, Tensor};
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0], &[2, 2]);
let mut rows: Vec<Vec<f64>> = Vec::new();
for step in t.informed_iter() {
match step {
// The innermost dimension (axis 1) opening means a new row starts.
StepInfo::EnterDimension(1) => rows.push(Vec::new()),
StepInfo::Value(v) => rows.last_mut().unwrap().push(v),
_ => {}
}
}
assert_eq!(rows, vec![vec![1.0, 2.0], vec![3.0, 4.0]]);Sourcepub fn deep_clone(&self) -> Self
pub fn deep_clone(&self) -> Self
Makes a deep copy of this tensor.
Sourcepub fn clone_detached(&self) -> Self
pub fn clone_detached(&self) -> Self
Make a shallow copy of this tensor with a new graph identity.
The underlying buffer is shared with the original, but the new tensor carries a fresh
graph ID. The planner treats it as an unrelated input - no connection is maintained to
any live promises that reference the original. Use Tensor::clone to preserve that
connection, or Tensor::deep_clone for a fully independent buffer.
Source§impl<T: Numeric, B: Backend> Tensor<T, B>
impl<T: Numeric, B: Backend> Tensor<T, B>
Sourcepub fn to_promise(&self) -> TensorPromise<T, B>
pub fn to_promise(&self) -> TensorPromise<T, B>
Wrap this tensor as a TensorPromise without applying any transformation.
The primary use case is initializing a mutable accumulator that will have ops
applied to it in a loop - as it needs a TensorPromise<T> on both sides
of the assignment:
use candela::arange;
let t = arange!(4); // [0.0, 1.0, 2.0, 3.0]
let mut p = t.to_promise();
for i in 0..5_u32 {
p += i as f64;
}
// each element gains 0+1+2+3+4 = 10
assert_eq!(p.materialize().data(), &[10.0, 11.0, 12.0, 13.0]);Sourcepub fn get(&self, index: &[usize]) -> Result<&T, OpError>
pub fn get(&self, index: &[usize]) -> Result<&T, OpError>
Return a reference to the element at index, following the tensor’s layout.
§Errors
Returns OpError::NotEnoughAxes if index doesn’t have one entry per
axis, or OpError::IndexOutOfBounds if an index is past the end of its axis.
§Examples
use candela::Tensor;
let t = Tensor::from_slice(&[1.0, 2.0, 3.0, 4.0, 5.0, 6.0], &[2, 3]);
assert_eq!(*t.get(&[1, 2])?, 6.0);
assert!(t.get(&[2, 0]).is_err()); // row 2 is past the endSourcepub fn to_slot(&self) -> SkeletonSlot<T, B>
pub fn to_slot(&self) -> SkeletonSlot<T, B>
Creates a SkeletonSlot shaped like this tensor.
The slot is an input placeholder for a Skeleton. It has the tensor’s
Layout but holds no data.
§Examples
use candela::Tensor;
let a = Tensor::from_scalar(0.3, &[4]);
let slot = a.to_slot(); // placeholder shaped like a
let skeleton = (&slot * 2.0 + 1.0).into_skeleton(&[slot])?;
assert!(skeleton.run(&[&a]).is_ok());Trait Implementations§
Source§impl<T, B> Add for Tensor<T, B>
impl<T, B> Add for Tensor<T, B>
Source§impl<T, B> Add<&BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<&BakedPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn add(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<&BakedPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn add(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<&CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn add(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<&CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn add(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<&SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn add(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<&SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn add(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Add<&SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn add(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Add<&SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn add(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Add<&Tensor<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§impl<T, B> Add<&Tensor<T, B>> for Tensor<T, B>
impl<T, B> Add<&Tensor<T, B>> for Tensor<T, B>
Source§impl<T, B> Add<&Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for &TensorPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for TensorPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for &BakedPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for BakedPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Add<&Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Add<&Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Add<&Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn add(self, rhs: &Tensor<T, B>) -> Self::Output
fn add(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<&TensorPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn add(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<&TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<&TensorPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn add(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<BakedPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: BakedPromise<T, B>) -> Self::Output
fn add(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<BakedPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: BakedPromise<T, B>) -> Self::Output
fn add(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn add(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn add(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn add(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn add(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Add<SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn add(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Add<SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn add(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Add<Tensor<T, B>> for &Tensor<T, B>
Source§impl<T, B> Add<Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for &TensorPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for TensorPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for &BakedPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for BakedPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Add<Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Add<Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Add<Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn add(self, rhs: Tensor<T, B>) -> Self::Output
fn add(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Add<TensorPromise<T, B>> for &Tensor<T, B>
Source§fn add(self, rhs: TensorPromise<T, B>) -> Self::Output
fn add(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> Add<TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Add<TensorPromise<T, B>> for Tensor<T, B>
Source§fn add(self, rhs: TensorPromise<T, B>) -> Self::Output
fn add(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
+ operator.Source§impl<T, B> AddAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> AddAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn add_assign(&mut self, rhs: &Tensor<T, B>)
fn add_assign(&mut self, rhs: &Tensor<T, B>)
+= operation. Read moreSource§impl<T, B> AddAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> AddAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn add_assign(&mut self, rhs: Tensor<T, B>)
fn add_assign(&mut self, rhs: Tensor<T, B>)
+= operation. Read moreSource§impl<T, B: Backend> Clone for Tensor<T, B>
impl<T, B: Backend> Clone for Tensor<T, B>
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Shallow copy sharing the same underlying buffer and graph identity.
Equivalent to bumping an Arc reference count. The copy is connected to all promises
that reference the original - the planner sees them as the same input node. For a copy
the graph treats as unrelated, use clone_detached. For an independent buffer, use
deep_clone.
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<T, B: Backend> Composable<T, B> for Tensor<T, B>
Source§impl<T, B: Backend> Dimension for Tensor<T, B>
impl<T, B: Backend> Dimension for Tensor<T, B>
fn layout(&self) -> &Layout
fn shape(&self) -> &[usize]
fn stride(&self) -> &[i32]
fn adj_stride(&self) -> &[i32]
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn offset(&self) -> usize
fn is_contiguous(&self) -> bool
fn is_contiguous_at_axis(&self, axis: usize) -> bool
fn is_transposed(&self) -> bool
fn is_transposed_at_axis(&self, axis: usize) -> bool
Source§impl<T, B> Div for Tensor<T, B>
impl<T, B> Div for Tensor<T, B>
Source§impl<T, B> Div<&BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<&BakedPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn div(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<&BakedPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn div(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<&CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn div(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<&CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn div(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<&SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn div(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<&SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn div(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Div<&SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn div(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Div<&SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn div(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Div<&Tensor<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§impl<T, B> Div<&Tensor<T, B>> for Tensor<T, B>
impl<T, B> Div<&Tensor<T, B>> for Tensor<T, B>
Source§impl<T, B> Div<&Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for &TensorPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for TensorPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for &BakedPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for BakedPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Div<&Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Div<&Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Div<&Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn div(self, rhs: &Tensor<T, B>) -> Self::Output
fn div(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<&TensorPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn div(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<&TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<&TensorPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn div(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<BakedPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: BakedPromise<T, B>) -> Self::Output
fn div(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<BakedPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: BakedPromise<T, B>) -> Self::Output
fn div(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn div(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn div(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn div(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn div(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Div<SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn div(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Div<SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn div(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Div<Tensor<T, B>> for &Tensor<T, B>
Source§impl<T, B> Div<Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for &TensorPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for TensorPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for &BakedPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for BakedPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Div<Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Div<Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Div<Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn div(self, rhs: Tensor<T, B>) -> Self::Output
fn div(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Div<TensorPromise<T, B>> for &Tensor<T, B>
Source§fn div(self, rhs: TensorPromise<T, B>) -> Self::Output
fn div(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> Div<TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Div<TensorPromise<T, B>> for Tensor<T, B>
Source§fn div(self, rhs: TensorPromise<T, B>) -> Self::Output
fn div(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
/ operator.Source§impl<T, B> DivAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> DivAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn div_assign(&mut self, rhs: &Tensor<T, B>)
fn div_assign(&mut self, rhs: &Tensor<T, B>)
/= operation. Read moreSource§impl<T, B> DivAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> DivAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn div_assign(&mut self, rhs: Tensor<T, B>)
fn div_assign(&mut self, rhs: Tensor<T, B>)
/= operation. Read moreSource§impl<T, B> Mul for Tensor<T, B>
impl<T, B> Mul for Tensor<T, B>
Source§impl<T, B> Mul<&BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&BakedPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn mul(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<&BakedPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn mul(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<&CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn mul(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<&SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn mul(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn mul(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Mul<&SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn mul(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§impl<T, B> Mul<&Tensor<T, B>> for Tensor<T, B>
impl<T, B> Mul<&Tensor<T, B>> for Tensor<T, B>
Source§impl<T, B> Mul<&Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &TensorPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for TensorPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &BakedPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for BakedPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Mul<&Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Mul<&Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
fn mul(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<&TensorPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<&TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<&TensorPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<BakedPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: BakedPromise<T, B>) -> Self::Output
fn mul(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<BakedPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: BakedPromise<T, B>) -> Self::Output
fn mul(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn mul(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn mul(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Mul<SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn mul(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Mul<SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn mul(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Mul<Tensor<T, B>> for &Tensor<T, B>
Source§impl<T, B> Mul<Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for &TensorPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for TensorPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for &BakedPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for BakedPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Mul<Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Mul<Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Mul<Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn mul(self, rhs: Tensor<T, B>) -> Self::Output
fn mul(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Mul<TensorPromise<T, B>> for &Tensor<T, B>
Source§fn mul(self, rhs: TensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> Mul<TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Mul<TensorPromise<T, B>> for Tensor<T, B>
Source§fn mul(self, rhs: TensorPromise<T, B>) -> Self::Output
fn mul(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
* operator.Source§impl<T, B> MulAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> MulAssign<&Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn mul_assign(&mut self, rhs: &Tensor<T, B>)
fn mul_assign(&mut self, rhs: &Tensor<T, B>)
*= operation. Read moreSource§impl<T, B> MulAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
impl<T, B> MulAssign<Tensor<T, B>> for TensorPromise<T, B>where
T: NumericOp,
B: Backend,
Source§fn mul_assign(&mut self, rhs: Tensor<T, B>)
fn mul_assign(&mut self, rhs: Tensor<T, B>)
*= operation. Read moreSource§impl<T, B> Sub for Tensor<T, B>
impl<T, B> Sub for Tensor<T, B>
Source§impl<T, B> Sub<&BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&BakedPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn sub(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<&BakedPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: &BakedPromise<T, B>) -> Self::Output
fn sub(self, rhs: &BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<&CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: &CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn sub(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<&SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
fn sub(self, rhs: &SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn sub(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Sub<&SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
fn sub(self, rhs: &SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§impl<T, B> Sub<&Tensor<T, B>> for Tensor<T, B>
impl<T, B> Sub<&Tensor<T, B>> for Tensor<T, B>
Source§impl<T, B> Sub<&Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &TensorPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for TensorPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &BakedPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for BakedPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Sub<&Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Sub<&Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
fn sub(self, rhs: &Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<&TensorPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
A SkeletonSlot anywhere in either operand makes the result a
SkeletonPromise instead of a TensorPromise.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<&TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<&TensorPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: &TensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: &TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<BakedPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<BakedPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: BakedPromise<T, B>) -> Self::Output
fn sub(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<BakedPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<BakedPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: BakedPromise<T, B>) -> Self::Output
fn sub(self, rhs: BakedPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<BakedPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<CachedTensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<CachedTensorPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<CachedTensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<CachedTensorPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: CachedTensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<CachedTensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<SkeletonPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<SkeletonPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn sub(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<SkeletonPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<SkeletonPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: SkeletonPromise<T, B>) -> Self::Output
fn sub(self, rhs: SkeletonPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<SkeletonSlot<T, B>> for &Tensor<T, B>
impl<T, B> Sub<SkeletonSlot<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn sub(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<SkeletonSlot<T, B>> for Tensor<T, B>
impl<T, B> Sub<SkeletonSlot<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: SkeletonSlot<T, B>) -> Self::Output
fn sub(self, rhs: SkeletonSlot<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<SkeletonSlot<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for &Tensor<T, B>
impl<T, B> Sub<Tensor<T, B>> for &Tensor<T, B>
Source§impl<T, B> Sub<Tensor<T, B>> for &TensorPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for &TensorPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for TensorPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for TensorPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <TensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for &CachedTensorPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for &CachedTensorPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for CachedTensorPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for CachedTensorPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <CachedTensorPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for &BakedPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for &BakedPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for BakedPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for BakedPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <BakedPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for &SkeletonSlot<T, B>
impl<T, B> Sub<Tensor<T, B>> for &SkeletonSlot<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for SkeletonSlot<T, B>
impl<T, B> Sub<Tensor<T, B>> for SkeletonSlot<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonSlot<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for &SkeletonPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for &SkeletonPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<Tensor<T, B>> for SkeletonPromise<T, B>
impl<T, B> Sub<Tensor<T, B>> for SkeletonPromise<T, B>
Source§fn sub(self, rhs: Tensor<T, B>) -> Self::Output
fn sub(self, rhs: Tensor<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
type Output = <SkeletonPromise<T, B> as BinaryResult<Tensor<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<TensorPromise<T, B>> for &Tensor<T, B>
impl<T, B> Sub<TensorPromise<T, B>> for &Tensor<T, B>
Source§fn sub(self, rhs: TensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
- operator.Source§impl<T, B> Sub<TensorPromise<T, B>> for Tensor<T, B>
impl<T, B> Sub<TensorPromise<T, B>> for Tensor<T, B>
Source§fn sub(self, rhs: TensorPromise<T, B>) -> Self::Output
fn sub(self, rhs: TensorPromise<T, B>) -> Self::Output
Applies the operation element-wise, broadcasting if the shapes are compatible.
§Panics
Panics when the operator is applied — not at .materialize() — if the
shapes are not broadcast-compatible.
Source§type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
type Output = <Tensor<T, B> as BinaryResult<TensorPromise<T, B>, T, B>>::Output
- operator.