From 7eaf2c9d09bf2f4bf312ddb5bc696a6ec24cf7e9 Mon Sep 17 00:00:00 2001 From: Eric Lunderberg Date: Fri, 1 Apr 2022 17:25:56 -0500 Subject: [PATCH] [Hexagon] Updated incomplete docstring As a follow-up from https://github.com/apache/tvm/pull/10846, completing a docstring that unintentionally ended in the middle of a sentence. --- src/runtime/hexagon/hexagon/hexagon_buffer.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/runtime/hexagon/hexagon/hexagon_buffer.h b/src/runtime/hexagon/hexagon/hexagon_buffer.h index ad5d04312cf9..99167f69cfca 100644 --- a/src/runtime/hexagon/hexagon/hexagon_buffer.h +++ b/src/runtime/hexagon/hexagon/hexagon_buffer.h @@ -94,9 +94,19 @@ class HexagonBuffer { //! \brief Prevent move assignment. HexagonBuffer& operator=(HexagonBuffer&&) = delete; - /*! \brief Return data pointer - * - * The return type depends on the buffer being + /*! \brief Return data pointer into the buffer + * + * The returned pointer is intended for use as the runtime value + * corresponding to the `Var BufferNode::data` of a buffer. The + * return type depends on the dimensionality of the buffer being + * accessed, and must be compatible with the usage defined in + * `CodeGenHexagon::CreateBufferPtr`. + * + * For a 1-d buffer, this pointer can be cast to a `T*` and accessed + * as a 1-d array (e.g. `static_cast(GetPointer())[i]`). + * For a 2-d buffer, this pointer can be cast to a `T**` and + * accessed as a 2-d array + * (e.g. `static_cast(GetPointer())[i][j]`). */ void* GetPointer();