Skip to content

Commit

Permalink
[Docs] Minor fixes with language extension docs
Browse files Browse the repository at this point in the history
There were some issues in the patch https://reviews.llvm.org/D104198. I also forgot to address one comment. This patch addresses these.

Reviewed By: xgupta

Differential Revision: https://reviews.llvm.org/D104971
  • Loading branch information
SaurabhJha committed Jun 26, 2021
1 parent d4f4a1b commit c8f3f46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clang/docs/LanguageExtensions.rst
Expand Up @@ -536,15 +536,16 @@ The matrix type extension also supports operations on a matrix and a scalar.
The matrix type extension supports division on a matrix and a scalar but not on a matrix and a matrix.

.. code-block:: c++

typedef float m4x4_t __attribute__((matrix_type(4, 4)));

m4x4_t f(m4x4_t a) {
a = a / 3.0;
return a;
}

The matrix type extension supports compound assignments for addition, subtraction, and multiplication between matrices
and between a matrix and a scalar, provided their types are consistent.
The matrix type extension supports compound assignments for addition, subtraction, and multiplication on matrices
and on a matrix and a scalar, provided their types are consistent.

.. code-block:: c++

Expand Down

0 comments on commit c8f3f46

Please sign in to comment.