rmlGetMTLBufferFromTensor
Gets an underlying Metal buffer from a tensor.
rml_status rmlGetMTLBufferFromTensor( |
rml_tensor tensor, |
void** buffer /* id<MTLBuffer>* */); |
API
Metal Interoperation
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
tensor |
input |
A valid tensor handle. |
buffer |
output |
A pointer to a resulting Metal buffer (id<MTLBuffer>). |
Return and Status Codes
Returns a non-NULL Metal buffer in case of success and status:
RML_OK
if the operation is successfulRML_ERROR_BAD_PARAMETER
if tensor is invalid or buffer isNULL
To get more details in case of failure, call rmlGetLastError().
The resulting buffer is a reference counted by the tensor.