Radeon ProRender

rmlCreateTensor

Creates an N-dimentional tensor with a given description.

rml_status rmlCreateTensor( rml_context context,
  const rml_tensor_info* info,
  rml_access_mode mode,
  rml_tensor* tensor);

API

Main

Parameters

Parameter Input/Output Description
context input A valid context handle.
info input Tensor description with all dimensions specified.
mode input Tensor data access mode.
tensor output A pointer to a resulting tensor handle.

Return and Status Codes

Returns a valid tensor handle in case of success and status:

  • RML_OK if the operation is successful
  • RML_ERROR_BAD_PARAMETER if context or info or mode is invalid, or tensor is NULL
  • RML_ERROR_OUT_OF_MEMORY if memory allocation failed
  • RML_ERROR_INTERNAL in case of an internal error.

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

The tensor should be released with rmlReleaseTensor().