Radeon ProRender


Gets an underlying OpenCL buffer from a tensor.

rml_status rmlGetClBufferFromTensor( rml_tensor tensor,
  void** buffer /* cl_mem* */);


OpenCL Interoperation


Parameter Input/Output Description
tensor input A valid tensor handle.
buffer output A pointer to a resulting OpenCL buffer (cl_mem).

Return and Status Codes

Returns a non-NULL OpenCL buffer pointer in case of success and status:

  • RML_OK if the operation is successful
  • RML_ERROR_BAD_PARAMETER if tensor is invalid or buffer is NULL

To get more details in case of failure, call rmlGetLastError().

The resulting buffer is a reference counted by the tensor.