Module dfdx::shapes

source ·
Expand description

Shape related traits/structes like Shape, Dtype, Dim, Axis, and Const

Example shapes:

let _: Rank3<2, 3, 4> = Default::default();
let _: (Const<2>, Const<3>) = Default::default();
let _: (usize, Const<4>) = (3, Const);
let _ = (Const::<5>, 4, Const::<3>, 2);

Re-exports

Structs

  • A set of 2 axes, e.g. Axes2<0, 1>, or Axes2<1, 3>.
  • A set of 3 axes, e.g. Axes3<1, 3, 4>
  • A set of 4 axes
  • A set of 5 axes
  • A set of 6 axes
  • A singular axis, e.g. Axis<0> or Axis<1>
  • Represents a Dim with size known at compile time

Traits

  • Represents either [T; N] or Vec<T>
  • Marker for shapes that have the same number of elements as Dst
  • Represents indices into the dimensions of shapes
  • Marker for shapes that can be broadcasted to Shape S along Axes Ax.
  • Internal implementation for broadcasting strides
  • Represents a single dimension where all instances are guaranteed to be the same size at compile time.
  • Represents a Shape that has all ConstDims
  • Represents a single dimension of a multi dimensional Shape
  • Represents something that has the axes Ax
  • Represents something that has a Shape.
  • Marker for shapes that can be permuted into Dst by using Ax as the new indices.
  • Marker for shapes that can be converted using their concrete types.
  • Marker for shapes that can have their Axes Ax reduced. See Self::Reduced for the resulting type.
  • Marker for shapes that can be reduced to Shape S along Axes Ax.
  • Internal implementation for reducing a shape
  • Marker for shapes that can be indexed and have a dimension removed
  • Marker for shapes that can be indexed and have a dimension replaced with a new one
  • A collection of dimensions (Dim) that change how a multi-dimensional array is interacted with.

Type Definitions

  • Compile time known shape with 0 dimensions
  • Compile time known shape with 1 dimensions
  • Compile time known shape with 2 dimensions
  • Compile time known shape with 3 dimensions
  • Compile time known shape with 4 dimensions
  • Compile time known shape with 5 dimensions
  • Compile time known shape with 6 dimensions