oa::MatrixShape
— dimensions of an oa::Matrix (OA's N-D array), rank up to OA_MAX_TENSOR_DIMS. Construct with brace-init for any rank: MatrixShape{m, n} // rank-2 MatrixShape{n, c, h, w} // rank-4 (e.g. conv NCHW) The variadic constructor keeps brace initialization without importing the hosted initializer-list or exception runtime.
Public Methods
Public Data Members
dimsArrayfieldrankoa::I32fieldConstructor & Destructor Documentation
Public Method Documentation
NumPy-style broadcast: align right, max dims, error if incompatible.
Parameters
inOtherconst MatrixShape &—
Returns
oa::Result<MatrixShape>The declared return value.
Compute broadcast strides for this shape against a broadcasted output shape. Returns row-major strides with 0 where this shape has a broadcasted dim (1 or absent).
Parameters
inOutconst MatrixShape &—
Returns
Array<oa::I64, OA_MAX_TENSOR_DIMS>The declared return value.
No public source comment is attached to this declaration.
Returns
oa::I64The declared return value.
No public source comment is attached to this declaration.
Parameters
inOtherconst MatrixShape &—
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Parameters
inOtherconst MatrixShape &—
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Parameters
inDimoa::I32—
Returns
oa::I64 &The declared return value.
No public source comment is attached to this declaration.
Parameters
inDimoa::I32—
Returns
oa::I64The declared return value.
Row-major: stride in elements for dimension inDim (product of later dims).
Parameters
inDimoa::I32—
Returns
oa::I64The declared return value.