Trait tract_core::internal::tract_ndarray::NdProducer [−][src]
pub trait NdProducer {
type Item;
type Dim: Dimension;
fn raw_dim(&self) -> Self::Dim;
fn __private__(&self) -> PrivateMarker;
}Expand description
A producer of an n-dimensional set of elements; for example an array view, mutable array view or an iterator that yields chunks.
Producers are used as a arguments to Zip and
azip!().
Comparison to IntoIterator
Most NdProducers are iterable (implement IntoIterator) but not directly
iterators. This separation is needed because the producer represents
a multidimensional set of items, it can be split along a particular axis for
parallelization, and it has no fixed correspondance to a sequence.
The natural exception is one dimensional producers, like AxisIter, which
implement Iterator directly
(AxisIter traverses a one dimensional sequence, along an axis, while
producing multidimensional items).
See also IntoNdProducer
Associated Types
Required methods
fn raw_dim(&self) -> Self::Dim[src]
fn raw_dim(&self) -> Self::Dim[src]Return the shape of the producer.
fn __private__(&self) -> PrivateMarker[src]
fn __private__(&self) -> PrivateMarker[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate.
Implementors
impl<'a, A, D> NdProducer for AxisIter<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for AxisIter<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for AxisIterMut<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for AxisIterMut<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for ExactChunks<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for ExactChunks<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for ExactChunksMut<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for ExactChunksMut<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for Lanes<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for Lanes<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for LanesMut<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for LanesMut<'a, A, D> where
D: Dimension, [src]impl<'a, A, D> NdProducer for Windows<'a, A, D> where
D: Dimension, [src]
impl<'a, A, D> NdProducer for Windows<'a, A, D> where
D: Dimension, [src]impl<A, D> NdProducer for ArrayBase<RawViewRepr<*const A>, D> where
D: Dimension, [src]
impl<A, D> NdProducer for ArrayBase<RawViewRepr<*const A>, D> where
D: Dimension, [src]type Item = *const A
type Dim = D
type Ptr = *const A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<RawViewRepr<*const A>, D> as NdProducer>::Stride[src]
&self
) -> <ArrayBase<RawViewRepr<*const A>, D> as NdProducer>::Stride
impl<A, D> NdProducer for ArrayBase<RawViewRepr<*mut A>, D> where
D: Dimension, [src]
impl<A, D> NdProducer for ArrayBase<RawViewRepr<*mut A>, D> where
D: Dimension, [src]type Item = *mut A
type Dim = D
type Ptr = *mut A
type Stride = isize
pub fn contiguous_stride(
&self
) -> <ArrayBase<RawViewRepr<*mut A>, D> as NdProducer>::Stride[src]
&self
) -> <ArrayBase<RawViewRepr<*mut A>, D> as NdProducer>::Stride