From 073cdde08ff40481ebac54ec801ed6c8d42d7c4a Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sat, 8 Nov 2025 12:18:55 -0400 Subject: [PATCH] livoxG1: StagingBuff: add getClEngineIovec --- stimBuffApis/livoxGen1/stagingBuffer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stimBuffApis/livoxGen1/stagingBuffer.h b/stimBuffApis/livoxGen1/stagingBuffer.h index bb3d7a2..4ed963f 100644 --- a/stimBuffApis/livoxGen1/stagingBuffer.h +++ b/stimBuffApis/livoxGen1/stagingBuffer.h @@ -106,6 +106,18 @@ public: return iov; } + /** EXPLANATION: + * Returns an iovec for OpenCL engine buffer access. + * The buffer is mmap()-allocated and suitable for CL_MEM_USE_HOST_PTR. + */ + struct iovec getClEngineIovec() const + { + struct iovec iov; + iov.iov_base = buffer.get(); + iov.iov_len = bufferNBytes; + return iov; + } + inline std::string stringify() const { std::ostringstream oss;