The NvMedia Tensor NvSciSync API encompasses all NvMedia Tensor Buffer Allocation processing.
Macros | |
#define | NVMEDIA_TENSOR_NVSCIBUF_VERSION_MAJOR (1u) |
Major version number. More... | |
#define | NVMEDIA_TENSOR_NVSCIBUF_VERSION_MINOR (7u) |
Minor version number. More... | |
#define | NVMEDIA_TENSOR_NVSCIBUF_VERSION_PATCH (0u) |
Patch version number. More... | |
Functions | |
NvMediaStatus | NvMediaTensorNvSciBufInit (void) |
Initializes the NvMediaTensor NvSciBuf APIs. More... | |
void | NvMediaTensorNvSciBufDeinit (void) |
De-initializes the NvMediaTensor NvSciBuf APIs. More... | |
NvMediaStatus | NvMediaTensorFillNvSciBufAttrs (const NvMediaDevice *device, const NvMediaTensorAttr *attrs, uint32_t numAttrs, uint32_t flags, NvSciBufAttrList attr_h) |
Fills the NvSciBuf attributes used to allocate a tensor. More... | |
NvMediaStatus | NvMediaTensorCreateFromNvSciBuf (NvMediaDevice *device, NvSciBufObj nvSciBufObjInstance, NvMediaTensor **nvmTensor) |
Creates NvMediaTensor from an NvSciBuf handle. More... | |
NvMediaStatus | NvMediaTensorNvSciBufGetVersion (NvMediaVersion *version) |
Returns version information for the NvMediaTensor NvSciBuf API. More... | |
#define NVMEDIA_TENSOR_NVSCIBUF_VERSION_MAJOR (1u) |
Major version number.
Definition at line 43 of file nvmedia_tensor_nvscibuf.h.
#define NVMEDIA_TENSOR_NVSCIBUF_VERSION_MINOR (7u) |
Minor version number.
Definition at line 45 of file nvmedia_tensor_nvscibuf.h.
#define NVMEDIA_TENSOR_NVSCIBUF_VERSION_PATCH (0u) |
Patch version number.
Definition at line 47 of file nvmedia_tensor_nvscibuf.h.
NvMediaStatus NvMediaTensorCreateFromNvSciBuf | ( | NvMediaDevice * | device, |
NvSciBufObj | nvSciBufObjInstance, | ||
NvMediaTensor ** | nvmTensor | ||
) |
Creates NvMediaTensor from an NvSciBuf handle.
When the application is done using NvMediaTensor, it must call NvMediaTensorDestroy() with NvMediaTensor.
[in] | device | A pointer to NvMediaDevice which has been DEPRECATED. Should be set to NULL. |
[in] | nvSciBufObjInstance | An NvSciBufObj for which an NvMediaTensor is to be imported. |
[in,out] | nvmTensor | A pointer to a location in which a pointer to an imported NvMediaTensor in stored. |
NVMEDIA_STATUS_OK | indicates that NvMediaTensor was successfully created from NvSciBufObj. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that overflow/underflow occured. |
NVMEDIA_STATUS_ERROR | indicates that another error occurred, such as failure to create NvMediaTensor from NvSciBufObj. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one of the pointer parameters is NULL, or NvSciBufObj was not allocated using the attributes filled by NvMediaTensorGetNvSciBufAttrs(). |
Usage considerations
NvMediaStatus NvMediaTensorFillNvSciBufAttrs | ( | const NvMediaDevice * | device, |
const NvMediaTensorAttr * | attrs, | ||
uint32_t | numAttrs, | ||
uint32_t | flags, | ||
NvSciBufAttrList | attr_h | ||
) |
Fills the NvSciBuf attributes used to allocate a tensor.
This API maps the information in attrs and flags to NvSciBuf attributes and fills them into NvSciBufAttrList referenced by attr_h.
After calling this function, the application can call NvSciBufObjAlloc() with attr_h as input and get an NvSciBufObj as output. Then it can call NvMediaTensorCreateFromNvSciBuf() to create an NvMediaTensor from the NvSciBufObj.
[in] | device | A pointer to NvMediaDevice which has been DEPRECATED. Should be set to NULL. |
[in] | attrs | A valid, non-NULL pointer to NvMediaTensorAttr. |
[in] | numAttrs | The number of attributes in the array. |
[in] | flags | Flags for module hint (used in future). |
[in,out] | attr_h | A valid non-NULL handle to NvSciBufAttrlist to hold the NvSciBuf attributes for the requested NvMediaTensor. |
NVMEDIA_STATUS_OK | if the function is successful. |
NVMEDIA_STATUS_NOT_SUPPORTED | indicates that overflow/underflow occured. |
NVMEDIA_STATUS_BAD_PARAMETER | if any argument is NULL or invalid or out of range. |
NVMEDIA_STATUS_OUT_OF_MEMORY | if there is a failure to allocate an internal struct. |
NVMEDIA_STATUS_ERROR | if any other error occurred. |
Usage considerations
void NvMediaTensorNvSciBufDeinit | ( | void | ) |
De-initializes the NvMediaTensor NvSciBuf APIs.
Usage considerations
NvMediaStatus NvMediaTensorNvSciBufGetVersion | ( | NvMediaVersion * | version | ) |
Returns version information for the NvMediaTensor NvSciBuf API.
[out] | version | A valid, non-NULLpointer to a structure in which the function may store version information. |
NVMEDIA_STATUS_OK | if the function call is successful. |
NVMEDIA_STATUS_BAD_PARAMETER | if version is invalid. |
Usage considerations
NvMediaStatus NvMediaTensorNvSciBufInit | ( | void | ) |
Initializes the NvMediaTensor NvSciBuf APIs.
NVMEDIA_STATUS_OK | if the initialization is successful. |
NVMEDIA_STATUS_ERROR | if there is an error in the initialization. |
Usage considerations