pub enum TypeInner {
Scalar(Scalar),
Vector {
size: VectorSize,
scalar: Scalar,
},
Matrix {
columns: VectorSize,
rows: VectorSize,
scalar: Scalar,
},
Atomic(Scalar),
Pointer {
base: Handle<Type>,
space: AddressSpace,
},
Array {
base: Handle<Type>,
size: ArraySize,
stride: u32,
},
Struct {
members: Vec<StructMember>,
span: u32,
},
Tensor {
scalar: Scalar,
shape: TensorShape,
},
}Expand description
The concrete shape of a type.
Variants§
Scalar(Scalar)
A single scalar value.
Vector
A vector of scalars.
Matrix
A matrix of column vectors.
Atomic(Scalar)
An atomic scalar.
Pointer
A pointer to a value in a given address space.
Array
A fixed-size or runtime-sized array.
Struct
A composite struct type.
Tensor
A multi-dimensional tensor with element type and shape.
Supports mixed static/dynamic dimensions for production ML models (e.g. dynamic batch with fixed spatial dimensions).
Fields
§
shape: TensorShapeShape with mixed static/dynamic dimensions.
Trait Implementations§
impl Eq for TypeInner
impl StructuralPartialEq for TypeInner
Auto Trait Implementations§
impl Freeze for TypeInner
impl RefUnwindSafe for TypeInner
impl Send for TypeInner
impl Sync for TypeInner
impl Unpin for TypeInner
impl UnsafeUnpin for TypeInner
impl UnwindSafe for TypeInner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more