File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/runtime/hexagon/hexagon Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,19 @@ class HexagonBuffer {
9494 // ! \brief Prevent move assignment.
9595 HexagonBuffer& operator =(HexagonBuffer&&) = delete ;
9696
97- /* ! \brief Return data pointer
98- *
99- * The return type depends on the buffer being
97+ /* ! \brief Return data pointer into the buffer
98+ *
99+ * The returned pointer is intended for use as the runtime value
100+ * corresponding to the `Var BufferNode::data` of a buffer. The
101+ * return type depends on the dimensionality of the buffer being
102+ * accessed, and must be compatible with the usage defined in
103+ * `CodeGenHexagon::CreateBufferPtr`.
104+ *
105+ * For a 1-d buffer, this pointer can be cast to a `T*` and accessed
106+ * as a 1-d array (e.g. `static_cast<int32_t*>(GetPointer())[i]`).
107+ * For a 2-d buffer, this pointer can be cast to a `T**` and
108+ * accessed as a 2-d array
109+ * (e.g. `static_cast<int32_t**>(GetPointer())[i][j]`).
100110 */
101111 void * GetPointer ();
102112
You can’t perform that action at this time.
0 commit comments