You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/01 02:08:00 UTC

[GitHub] [tvm] Lunderberg commented on a change in pull request #10846: [Hexagon] Support both 1-d and 2-d VTCM allocations

Lunderberg commented on a change in pull request #10846:
URL: https://github.com/apache/tvm/pull/10846#discussion_r840173881



##########
File path: src/runtime/hexagon/hexagon/hexagon_buffer.h
##########
@@ -94,8 +94,24 @@ class HexagonBuffer {
   //! \brief Prevent move assignment.
   HexagonBuffer& operator=(HexagonBuffer&&) = delete;
 
-  //! \brief Return pointer to allocations.
-  void** GetPointer();
+  /*! \brief Return data pointer
+   *
+   * The return type depends on the buffer being
+   */
+  void* GetPointer();
+
+  // //! \brief Return number of allocations.
+  // size_t GetNumAllocs() { return nallocs_; }
+
+  /*! \brief Return dimensionality of buffer
+   *
+   * Will always be either 1 or 2.  If the buffer is 1-d, allocation
+   * returns a pointer to data, which is accessed by
+   * ((value_type*)ptr)[i].  If the buffer is 2-d, allocation returns
+   * a pointer to an array of pointers, which is accessed by
+   * ((value_type**)ptr)[i][j].
+   */
+  size_t GetBufferDimension() { return ndim_; }

Review comment:
       Thank you, and done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org