Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/runtime/hexagon/hexagon/hexagon_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t*>(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<int32_t**>(GetPointer())[i][j]`).
*/
void* GetPointer();

Expand Down