SaurabhJha updated this revision to Diff 360524.
SaurabhJha added a comment.

Updated docs to address comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106005

Files:
  clang/docs/MatrixTypes.rst


Index: clang/docs/MatrixTypes.rst
===================================================================
--- clang/docs/MatrixTypes.rst
+++ clang/docs/MatrixTypes.rst
@@ -266,6 +266,18 @@
   }
 
 
+Initialization Syntax
+---------------------
+A value of a matrix type M can be initialised using aggregate initialization 
syntax:
+
+.. code-block:: c++
+
+  constexpr M m1 = {};
+  constexpr M m2 = {{a, b, c}, {d, e, f}};
+
+The number of constituent arrays must equal the number rows in the matrix type 
M and the number of elements
+in each constituent array must equal the number of columns in the matrix type.
+
 TODOs
 -----
 
@@ -274,9 +286,6 @@
 convenient. The alternative is using template deduction to extract this
 information. Also add spelling for C.
 
-Future Work: Initialization syntax.
-
-
 Decisions for the Implementation in Clang
 =========================================
 


Index: clang/docs/MatrixTypes.rst
===================================================================
--- clang/docs/MatrixTypes.rst
+++ clang/docs/MatrixTypes.rst
@@ -266,6 +266,18 @@
   }
 
 
+Initialization Syntax
+---------------------
+A value of a matrix type M can be initialised using aggregate initialization syntax:
+
+.. code-block:: c++
+
+  constexpr M m1 = {};
+  constexpr M m2 = {{a, b, c}, {d, e, f}};
+
+The number of constituent arrays must equal the number rows in the matrix type M and the number of elements
+in each constituent array must equal the number of columns in the matrix type.
+
 TODOs
 -----
 
@@ -274,9 +286,6 @@
 convenient. The alternative is using template deduction to extract this
 information. Also add spelling for C.
 
-Future Work: Initialization syntax.
-
-
 Decisions for the Implementation in Clang
 =========================================
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to