Skip to main content

TensorSpan

Struct TensorSpan 

Source
pub struct TensorSpan<'a, T, const MAX_RANK: usize = DEFAULT_MAX_RANK> { /* private fields */ }
Expand description

A mutable view into a Tensor.

Implementations§

Source§

impl<'a, T, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub unsafe fn from_raw_parts( data: *mut T, shape: &[usize], strides_bytes: &[isize], ) -> Self

Create a mutable view from a raw pointer, shape, and byte strides.

§Safety
  • data must be valid for reads and writes over the region described by shape and strides_bytes.
  • The pointed-to memory must outlive 'a.
  • shape.len() must be <= MAX_RANK.
  • shape.len() must equal strides_bytes.len().
  • No other references to the memory may exist for the duration of 'a.
§Panics

Panics if shape.len() > MAX_RANK or shape.len() != strides_bytes.len().

Source

pub fn shape(&self) -> &[usize]

Returns the shape of the view.

Source

pub fn ndim(&self) -> usize

Returns the number of dimensions.

Source

pub fn rank(&self) -> usize

Returns the number of dimensions (alias for ndim()).

Source

pub fn numel(&self) -> usize

Returns the total number of logical elements (computed from shape).

Source

pub fn is_empty(&self) -> bool

Returns true if the view has no elements.

Source

pub fn stride_bytes(&self, dim: usize) -> isize

Returns the stride in bytes for the given dimension.

Source

pub fn as_ptr(&self) -> *const T

Returns a pointer to the first element.

Source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns a mutable pointer to the first element.

Source

pub fn has_contiguous_rows(&self) -> bool

Check if the view has contiguous rows.

Source

pub fn is_contiguous(&self) -> bool

Check if the entire view is contiguous in memory.

Source

pub fn as_view(&self) -> TensorView<'_, T, MAX_RANK>

Reborrow as immutable view.

Source

pub fn try_flat<I: VectorIndex>(&self, index: I) -> Result<&T, TensorError>

Try to get an element by flat logical row-major index.

Source

pub fn try_flat_mut<I: VectorIndex>( &mut self, index: I, ) -> Result<&mut T, TensorError>

Try to get a mutable element by flat logical row-major index.

Source

pub fn try_coords<C: TensorCoordinates>( &self, coords: C, ) -> Result<&T, TensorError>

Try to get an element by exact coordinates.

Source

pub fn try_coords_mut<C: TensorCoordinates>( &mut self, coords: C, ) -> Result<&mut T, TensorError>

Try to get a mutable element by exact coordinates.

Source

pub fn try_scalar(&self) -> Result<&T, TensorError>

Try to access the scalar value of a rank-0 tensor span.

Source

pub fn try_scalar_mut(&mut self) -> Result<&mut T, TensorError>

Try to access the mutable scalar value of a rank-0 tensor span.

Source

pub fn slice_leading<I: VectorIndex>( &self, index: I, ) -> Result<TensorView<'_, T, MAX_RANK>, TensorError>

Slice the leading axis by one index, reducing rank by one.

Source

pub fn slice_leading_mut<I: VectorIndex>( &mut self, index: I, ) -> Result<TensorSpan<'_, T, MAX_RANK>, TensorError>

Slice the leading axis mutably by one index, reducing rank by one.

Source

pub fn slice( &self, spec: impl SliceSpec, ) -> Result<TensorView<'_, T, MAX_RANK>, TensorError>

Slice the span along multiple dimensions.

Accepts tuples of Rust range types or &[SliceRange].

Source

pub fn slice_mut( &mut self, spec: impl SliceSpec, ) -> Result<TensorSpan<'_, T, MAX_RANK>, TensorError>

Slice the span mutably along multiple dimensions.

Accepts tuples of Rust range types or &[SliceRange].

Source§

impl<'a, T: StorageElement, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub fn storage_len(&self) -> usize

Number of storage values (for sub-byte types, less than numel).

Source

pub fn as_contiguous_slice(&self) -> Option<&[T]>

Convert to slice (only valid for contiguous views).

Source

pub fn as_contiguous_slice_mut(&mut self) -> Option<&mut [T]>

Convert to mutable slice (only valid for contiguous views).

Source§

impl<'a, T: StorageElement, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub fn transpose(&self) -> Result<TensorSpan<'a, T, MAX_RANK>, TensorError>

Transpose (reverse all dimensions, no data copy).

Returns an error for sub-byte types with ndim >= 2.

Source

pub fn reshape( &self, new_shape: &[usize], ) -> Result<TensorSpan<'a, T, MAX_RANK>, TensorError>

Reshape the span (must have same total elements, contiguous only).

Returns an error for sub-byte types.

Source

pub fn flatten(&self) -> Result<TensorSpan<'a, T, MAX_RANK>, TensorError>

Flatten to 1D (requires contiguous layout).

Source

pub fn squeeze(&self) -> TensorSpan<'a, T, MAX_RANK>

Remove dimensions of size 1.

Source§

impl<'a, T: Clone + StorageElement, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub fn to_owned(&self) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Copy the span contents to a new owned Tensor.

Source§

impl<'a, T, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub fn axis_spans<I: VectorIndex>( &mut self, axis: I, ) -> Result<AxisIteratorMut<'a, T, MAX_RANK>, TensorError>

Iterate mutably along the given axis, yielding sub-tensor spans with rank-1.

Source§

impl<'a, T: FloatConvertible, const MAX_RANK: usize> TensorSpan<'a, T, MAX_RANK>

Source

pub fn iter(&self) -> TensorViewIterator<'_, T, MAX_RANK>

Returns a lazy iterator over all logical scalars in row-major order.

Yields (position, DimRef) pairs. Use .iter().dims() for just dimensions. For sub-byte types, the innermost dimension is expanded.

Source

pub fn iter_mut(&mut self) -> TensorSpanIterator<'_, T, MAX_RANK>

Returns a mutable iterator over all logical scalars in row-major order.

Yields (position, DimMut) pairs. Use .iter_mut().dims() for just dimensions.

Trait Implementations§

Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2, I3)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2, I3)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2, I3, I4)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2, I3, I4)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2, I3, I4, I5)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2, I3, I4, I5)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, I6: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2, I3, I4, I5, I6)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2, I3, I4, I5, I6)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, I6: VectorIndex, I7: VectorIndex, T, const MAX_RANK: usize> Index<(I0, I1, I2, I3, I4, I5, I6, I7)> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (I0, I1, I2, I3, I4, I5, I6, I7)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I: VectorIndex, T, const MAX_RANK: usize> Index<I> for TensorSpan<'a, T, MAX_RANK>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: I) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: (I0, I1)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: (I0, I1, I2)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2, I3)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: (I0, I1, I2, I3)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2, I3, I4)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: (I0, I1, I2, I3, I4)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2, I3, I4, I5)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: (I0, I1, I2, I3, I4, I5)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, I6: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2, I3, I4, I5, I6)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut( &mut self, index: (I0, I1, I2, I3, I4, I5, I6), ) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I0: VectorIndex, I1: VectorIndex, I2: VectorIndex, I3: VectorIndex, I4: VectorIndex, I5: VectorIndex, I6: VectorIndex, I7: VectorIndex, T, const MAX_RANK: usize> IndexMut<(I0, I1, I2, I3, I4, I5, I6, I7)> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut( &mut self, index: (I0, I1, I2, I3, I4, I5, I6, I7), ) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, I: VectorIndex, T, const MAX_RANK: usize> IndexMut<I> for TensorSpan<'a, T, MAX_RANK>

Source§

fn index_mut(&mut self, index: I) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T: FloatConvertible, const MAX_RANK: usize> IntoIterator for &'a TensorSpan<'a, T, MAX_RANK>

Source§

type Item = ([usize; MAX_RANK], DimRef<'a, T>)

The type of the elements being iterated over.
Source§

type IntoIter = TensorViewIterator<'a, T, MAX_RANK>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T: FloatConvertible, const MAX_RANK: usize> IntoIterator for &'a mut TensorSpan<'a, T, MAX_RANK>

Source§

type Item = ([usize; MAX_RANK], DimMut<'a, T>)

The type of the elements being iterated over.
Source§

type IntoIter = TensorSpanIterator<'a, T, MAX_RANK>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T: FloatConvertible, const MAX_RANK: usize> PartialEq for TensorSpan<'a, T, MAX_RANK>
where T::DimScalar: PartialEq,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, T: StorageElement, const R: usize> TensorMut<T, R> for TensorSpan<'a, T, R>

Source§

fn as_mut_ptr(&mut self) -> *mut T

Source§

impl<'a, T: StorageElement, const R: usize> TensorRef<T, R> for TensorSpan<'a, T, R>

Source§

fn shape(&self) -> &[usize]

Source§

fn ndim(&self) -> usize

Source§

fn stride_bytes(&self, dim: usize) -> isize

Source§

fn as_ptr(&self) -> *const T

Source§

fn view(&self) -> TensorView<'_, T, R>

Borrow as an immutable TensorView.
Source§

fn numel(&self) -> usize

Total number of logical elements (product of shape dimensions).
Source§

fn rank(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn has_contiguous_rows(&self) -> bool

Source§

fn is_contiguous(&self) -> bool

Auto Trait Implementations§

§

impl<'a, T, const MAX_RANK: usize> Freeze for TensorSpan<'a, T, MAX_RANK>

§

impl<'a, T, const MAX_RANK: usize> RefUnwindSafe for TensorSpan<'a, T, MAX_RANK>
where T: RefUnwindSafe,

§

impl<'a, T, const MAX_RANK: usize = DEFAULT_MAX_RANK> !Send for TensorSpan<'a, T, MAX_RANK>

§

impl<'a, T, const MAX_RANK: usize = DEFAULT_MAX_RANK> !Sync for TensorSpan<'a, T, MAX_RANK>

§

impl<'a, T, const MAX_RANK: usize> Unpin for TensorSpan<'a, T, MAX_RANK>

§

impl<'a, T, const MAX_RANK: usize> UnsafeUnpin for TensorSpan<'a, T, MAX_RANK>

§

impl<'a, T, const MAX_RANK: usize = DEFAULT_MAX_RANK> !UnwindSafe for TensorSpan<'a, T, MAX_RANK>

Blanket Implementations§

Source§

impl<C, T, const R: usize> AllCloseOps<T, R> for C

Source§

fn allclose( &self, other: &(impl TensorRef<T, MAX_RANK> + ?Sized), atol: f64, rtol: f64, ) -> bool

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, const R: usize, C> BlendOps<T, R> for C
where T: Clone + EachBlend, C: TensorRef<T, R>, <T as EachBlend>::Scalar: From<f32> + Copy,

Source§

fn try_sub_tensor( &self, other: &(impl TensorRef<T, MAX_RANK> + ?Sized), ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S, const R: usize, C> CastOps<S, R> for C
where S: Clone + CastDtype, C: TensorRef<S, R>,

Source§

fn try_cast_dtype<D: Clone + CastDtype>( &self, ) -> Result<Tensor<D, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> FmaOps<T, R> for C
where T: Clone + EachFMA, C: TensorRef<T, R>, <T as EachFMA>::Scalar: From<f32> + Copy,

Source§

fn try_mul_tensor( &self, other: &(impl TensorRef<T, MAX_RANK> + ?Sized), ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, const R: usize, C> MinMaxOps<T, R> for C

Source§

fn try_minmax_all(&self) -> Result<MinMaxResult<T::Output>, TensorError>

Source§

fn try_minmax_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<MinMaxResult<Tensor<<T as ReduceMinMax>::Output, Global, MAX_RANK>, Tensor<usize, Global, MAX_RANK>>, TensorError>

Source§

fn try_minmax_axis_into<I: VectorIndex>( &self, axis: I, keep_dims: bool, min_out: &mut Tensor<T::Output, Global, MAX_RANK>, argmin_out: &mut Tensor<usize, Global, MAX_RANK>, max_out: &mut Tensor<T::Output, Global, MAX_RANK>, argmax_out: &mut Tensor<usize, Global, MAX_RANK>, ) -> Result<(), TensorError>

Source§

fn try_min_all(&self) -> Result<T::Output, TensorError>

Source§

fn try_argmin_all(&self) -> Result<usize, TensorError>

Source§

fn try_max_all(&self) -> Result<T::Output, TensorError>

Source§

fn try_argmax_all(&self) -> Result<usize, TensorError>

Source§

fn try_min_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<T::Output, Global, MAX_RANK>, TensorError>

Source§

fn try_argmin_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<usize, Global, MAX_RANK>, TensorError>

Source§

fn try_max_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<T::Output, Global, MAX_RANK>, TensorError>

Source§

fn try_argmax_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<usize, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> MomentsOps<T, R> for C

Source§

fn try_moments_all(&self) -> Result<(T::SumOutput, T::SumSqOutput), TensorError>

Source§

fn try_moments_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<(Tensor<<T as ReduceMoments>::SumOutput, Global, MAX_RANK>, Tensor<<T as ReduceMoments>::SumSqOutput, Global, MAX_RANK>), TensorError>

Source§

fn try_moments_axis_into<I: VectorIndex>( &self, axis: I, keep_dims: bool, sum_out: &mut Tensor<T::SumOutput, Global, MAX_RANK>, sumsq_out: &mut Tensor<T::SumSqOutput, Global, MAX_RANK>, ) -> Result<(), TensorError>

Source§

fn try_sum_all(&self) -> Result<T::SumOutput, TensorError>

Source§

fn try_sum_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<T::SumOutput, Global, MAX_RANK>, TensorError>

Source§

fn try_sum_axis_into<I: VectorIndex>( &self, axis: I, keep_dims: bool, out: &mut Tensor<T::SumOutput, Global, MAX_RANK>, ) -> Result<(), TensorError>

Source§

fn try_norm_all(&self) -> Result<f64, TensorError>

Source§

fn try_norm_axis<I: VectorIndex>( &self, axis: I, keep_dims: bool, ) -> Result<Tensor<f64, Global, MAX_RANK>, TensorError>

Source§

fn try_norm_axis_into<I: VectorIndex>( &self, axis: I, keep_dims: bool, out: &mut Tensor<f64, Global, MAX_RANK>, ) -> Result<(), TensorError>

Source§

impl<T, const R: usize, C> ScaleOps<T, R> for C
where T: Clone + EachScale, C: TensorRef<T, R>, <T as EachScale>::Scalar: From<f32> + Mul<Output = <T as EachScale>::Scalar> + Copy,

Source§

fn try_add_scalar( &self, scalar: T::Scalar, ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

fn try_sub_scalar( &self, scalar: T::Scalar, ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

fn try_mul_scalar( &self, scalar: T::Scalar, ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> SumOps<T, R> for C
where T: Clone + EachSum, C: TensorRef<T, R>,

Source§

fn try_add_tensor( &self, other: &(impl TensorRef<T, MAX_RANK> + ?Sized), ) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> SymmetricAngulars<T, R> for C
where T: Angulars, C: TensorRef<T, R>,

Source§

impl<T, const R: usize, C> SymmetricDots<T, R> for C
where T: Dots, C: TensorRef<T, R>, <T as Dots>::Accumulator: Clone + Default + 'static,

Source§

impl<T, const R: usize, C> SymmetricEuclideans<T, R> for C
where T: Euclideans, C: TensorRef<T, R>,

Source§

impl<T, const R: usize, C> SymmetricHammings<T, R> for C
where T: Hammings, C: TensorRef<T, R>,

Source§

impl<T, const R: usize, C> SymmetricJaccards<T, R> for C
where T: Jaccards, C: TensorRef<T, R>,

Source§

impl<T, const R: usize, C> TrigAtanOps<T, R> for C
where T: Clone + EachATan, C: TensorRef<T, R>,

Source§

fn try_atan(&self) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> TrigCosOps<T, R> for C
where T: Clone + EachCos, C: TensorRef<T, R>,

Source§

fn try_cos(&self) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T, const R: usize, C> TrigSinOps<T, R> for C
where T: Clone + EachSin, C: TensorRef<T, R>,

Source§

fn try_sin(&self) -> Result<Tensor<T, Global, MAX_RANK>, TensorError>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.