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;