[PATCH] D104198: [Matrix] Add documentation for compound assignment and type conversion of matrix types

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 14 07:36:36 PDT 2021


fhahn added a comment.

Thanks for the patch! some comments inline.



================
Comment at: clang/docs/LanguageExtensions.rst:527
+The matrix type extension supports compound assignments for addition, subtraction, and multiplication, provided
+their types are consistent.
+
----------------
it might also be helpful to include an example with matrix / scalar operations? Division is also supported for matrix/scalar combinations (but not for matrix/matrix)


================
Comment at: clang/docs/LanguageExtensions.rst:533
+
+  void f(m4x4_t a, m4x4_t b) {
+    a += b;
----------------
perhaps return the result, so it is not a no-op?


================
Comment at: clang/docs/LanguageExtensions.rst:547
+
+  void f1(ix5x5 i, fx5x5 f) {
+    f = (fx5x5)i;
----------------
can we instead return the casted value, so the code is not a no-op?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104198/new/

https://reviews.llvm.org/D104198



More information about the cfe-commits mailing list