Lines Matching full:matrix

2 Matrix Types
20 Matrix Type
23 A matrix type is a scalar type with an underlying *element type*, a constant
24 number of *rows*, and a constant number of *columns*. Matrix types with the same
25 element type, rows, and columns are the same type. A value of a matrix type
33 Currently, the element type of a matrix is only permitted to be one of the
43 Matrix Type Attribute
46 Matrix types can be declared by adding the ``matrix_type`` attribute to the
48 of the *typedef* must be a valid matrix element type. The
52 type of the *typedef* becomes a matrix type with the given dimensions and an
67 A value of matrix type can be converted to another matrix type if the number of
69 element type of the result type. The result is a matrix where each element is
72 A value of any real type (as in C23 6.2.5p14) can be converted to a matrix type
73 if it can be converted to the element type of the matrix. The result is a
74 matrix where all elements are the converted original value.
87 * If both operands are of matrix type, no arithmetic conversion is performed.
88 * If one operand is of matrix type and the other operand is of a real type,
89 convert the real type operand to the matrix type
92 Matrix Type Element Access Operator
95 An expression of the form ``E1 [E2] [E3]``, where ``E1`` has matrix type ``cv
96 M``, is a matrix element access expression. Let ``T`` be the element type
104 ``T`` and is the value of the element at the given row and column in the matrix.
107 the matrix.
109 Programs containing a single subscript expression into a matrix are ill-formed.
112 ``postfix-expression [expression]`` to access columns of a matrix. We think
116 builtins to extract rows and columns from a matrix. This makes the operations
119 Matrix Type Binary Operators
123 and subtraction, while the ``*`` operator performs matrix multiplication.
124 ``+``, ``-``, ``*``, and ``/`` can also be used with a matrix and a scalar
125 value, applying the operation to each element of the matrix.
133 * ``BIN_OP`` is one of ``+`` or ``-``, one of ``M1`` and ``M2`` is of matrix
134 type, and the other is of matrix type or real type; or
135 * ``BIN_OP`` is ``*``, one of ``M1`` and ``M2`` is of matrix type, and the
137 * ``BIN_OP`` is ``/``, ``M1`` is of matrix type, and ``M2`` is of a real type:
141 * ``M1`` and ``M2`` shall be of the same matrix type.
143 columns and row is the number of rows in the matrix type:
152 Given the expression ``M1 * M2`` where ``M1`` and ``M2`` are of matrix type:
157 * The resulting type, ``MTy``, is a matrix type with the common element type,
175 All operations on matrix types match the behavior of the element type with
179 operations on matrix types match the behavior of the elementwise operations
185 as part of a matrix operation are considered intermediate operations, and their
193 Matrix Type Builtin Operations
196 Each matrix type supports a collection of builtin expressions that look like
204 * *M*, *M1*, *M2*, *M3* - Matrix types
209 ``M2 __builtin_matrix_transpose(M1 matrix)``
211 **Remarks**: The return type is a cv-unqualified matrix type that has the same
215 **Returns**: A matrix ``Res`` equivalent to the code below, where ``col`` refers to the
225 Res[C][R] = matrix[R][C];
234 **Remarks**: The return type is a cv-unqualified matrix type with an element
239 **Returns**: A matrix ``Res`` equivalent to:
251 ``void __builtin_matrix_column_major_store(M matrix, T *ptr, size_t columnStride)``
255 **Remarks**: The type ``T`` is the const-unqualified version of the matrix
265 ptr[R] = matrix[R][C];
274 where M is a matrix type? We don’t support this anywhere else, but it’s
287 The elements of a value of a matrix type are laid out in column-major order
291 contraction of those operations (e.g. *-ffp-contract=matrix*).
293 TODO: Specify how matrix values are passed to functions.