Function Snpe_Util_CreateUserGlBuffer¶
Defined in File SNPEUtil.h
Function Documentation¶
-
Snpe_IUserBuffer_Handle_t Snpe_Util_CreateUserGlBuffer(void *buffer, size_t bufSize, Snpe_TensorShape_Handle_t stridesHandle, Snpe_IUserBuffer_Handle_t userBufferEncodingHandle, Snpe_IUserBuffer_Handle_t userBufferSourceHandle)¶
Creates a UserBuffer.
- Parameters
buffer – [in] Pointer to the buffer that the caller supplies
bufSize – [in] Buffer size, in bytes
stridesHandle – [in] Total number of bytes between elements in each dimension. E.g. A tightly packed tensor of floats with dimensions [4, 3, 2] would have strides of [24, 8, 4].
userBufferEncodingHandle – [in] Reference to an UserBufferEncoding object
userBufferSourceHandle – [in] Reference to an UserBufferSource object
- Returns
the created UserBuffer
Note
Caller has to ensure that memory pointed to by buffer stays accessible for the lifetime of the object created