NVIDIA Software Communications Interface (SCI) : NvSciBuf
Allows applications to allocate and exchange buffers in memory.
Definition in file nvscibuf.h.
Go to the source code of this file.
Data Structures | |
struct | NvSciBufAttrKeyValuePair |
Defines a key/value pair of attribute to be set. More... | |
struct | NvSciBufObjIpcExportDescriptor |
Defines the export data (blob) for NvSciBufObj. More... | |
Macros | |
#define | NV_SCI_BUF_TENSOR_MAX_DIMS 8u |
Maximum number of dimensions supported by tensor datatype. More... | |
#define | NV_SCI_BUF_IMAGE_MAX_PLANES 3u |
Maximum number of planes supported by image datatype. More... | |
#define | NV_SCI_BUF_PYRAMID_MAX_LEVELS 10u |
Maximum number of levels supported by pyramid datatype. More... | |
#define | NVSCIBUF_EXPORT_DESC_SIZE 32u |
Indicates the size of export descriptor. More... | |
#define | NV_SCI_BUF_ATTRKEY_BIT_COUNT 16u |
Indicates number of bits used for defining an attribute key. More... | |
#define | NV_SCI_BUF_DATATYPE_BIT_COUNT 10u |
Indicates number of bits used for defining datatype of a key. More... | |
#define | NV_SCI_BUF_ATTR_KEY_TYPE_PUBLIC 0 |
Indicates the attribute key is a public key type. More... | |
#define | NV_SCI_BUF_KEYTYPE_BIT_START (NV_SCI_BUF_DATATYPE_BIT_COUNT + NV_SCI_BUF_ATTRKEY_BIT_COUNT) |
Global constant to specify the start-bit of attribute Keytype. More... | |
#define | NV_SCI_BUF_GENERAL_ATTR_KEY_START |
Indicates starting value of General attribute keys. More... | |
#define | NV_SCI_BUF_RAW_BUF_ATTR_KEY_START |
Indicates the start of Raw-buffer Datatype keys. More... | |
#define | NV_SCI_BUF_IMAGE_ATTR_KEY_START |
Indicates the start of Image Datatype keys. More... | |
#define | NV_SCI_BUF_PYRAMID_ATTR_KEY_START |
Indicates the start of ImagePyramid Datatype keys. More... | |
#define | NV_SCI_BUF_ARRAY_ATTR_KEY_START |
Indicates the start of NvSciBuf Array Datatype keys. More... | |
#define | NV_SCI_BUF_TENSOR_ATTR_KEY_START |
Macro to specify the start of Tensor Datatype keys. More... | |
Typedefs | |
typedef struct NvSciBufModuleRec * | NvSciBufModule |
Holds a pointer to NvSciBufModuleRec. More... | |
typedef struct NvSciBufObjRefRec * | NvSciBufObj |
Holds a pointer to NvSciBufObjRefRec. More... | |
typedef struct NvSciBufAttrListRec * | NvSciBufAttrList |
Holds a pointer to NvSciBufAttrListRec. More... | |
Functions | |
NvSciError | NvSciBufAttrListCreate (NvSciBufModule module, NvSciBufAttrList *newAttrList) |
Creates an attribute list holding the attributes of the NvSciBufObj to be allocated. More... | |
void | NvSciBufAttrListFree (NvSciBufAttrList attrList) |
Frees the memory of an attribute list. More... | |
NvSciError | NvSciBufAttrListSetAttrs (NvSciBufAttrList attrList, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount) |
Sets the attribute values in the attribute list. More... | |
size_t | NvSciBufAttrListGetSlotCount (NvSciBufAttrList attrList) |
Returns the slot count per key in an attribute list. More... | |
NvSciError | NvSciBufAttrListGetAttrs (NvSciBufAttrList attrList, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount) |
Returns an array of attribute key/value pairs for a given set of keys. More... | |
NvSciError | NvSciBufAttrListSlotGetAttrs (NvSciBufAttrList attrList, size_t slotIndex, NvSciBufAttrKeyValuePair *pairArray, size_t pairCount) |
Returns an array of attribute key/value pairs from a multi-slot unreconciled attribute list at the given slot index. More... | |
NvSciError | NvSciBufAttrListDebugDump (NvSciBufAttrList attrList, void **buf, size_t *len) |
Allocates a buffer and then dumps the contents of the specified attribute list into the buffer. More... | |
NvSciError | NvSciBufAttrListReconcile (NvSciBufAttrList inputArray[], size_t inputCount, NvSciBufAttrList *newReconciledAttrList, NvSciBufAttrList *newConflictList) |
Reconciles the given unreconciled attribute list(s) into a new reconciled attribute list. More... | |
NvSciError | NvSciBufAttrListClone (NvSciBufAttrList origAttrList, NvSciBufAttrList *newAttrList) |
Clones an unreconciled/reconciled attribute list. More... | |
NvSciError | NvSciBufAttrListAppendUnreconciled (const NvSciBufAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciBufAttrList *newUnreconciledAttrList) |
Append multiple unreconciled attribute lists together, forming a single new unreconciled attribute list with a slot count equal to the sum of all the slot counts in the input list. More... | |
NvSciError | NvSciBufAttrListIsReconciled (NvSciBufAttrList attrList, bool *isReconciled) |
Checks if an attribute list is reconciled. More... | |
NvSciError | NvSciBufAttrListValidateReconciled (NvSciBufAttrList reconciledAttrList, const NvSciBufAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, bool *isReconcileListValid) |
Validates a reconciled attribute list against a set of unreconciled attribute lists. More... | |
NvSciError | NvSciBufObjDup (NvSciBufObj bufObj, NvSciBufObj *dupObj) |
Clones a NvSciBuf object. More... | |
NvSciError | NvSciBufAttrListReconcileAndObjAlloc (NvSciBufAttrList attrListArray[], size_t attrListCount, NvSciBufObj *bufObj, NvSciBufAttrList *newConflictList) |
Reconcile the input unreconciled attribute list(s) into a new reconciled attribute list and allocate NvSciBuf object that meets all the constraints in the new reconciled attribute list. More... | |
void | NvSciBufObjFree (NvSciBufObj bufObj) |
Destroys the NvSciBuf object, which frees any memory allocated for it. More... | |
NvSciError | NvSciBufObjGetAttrList (NvSciBufObj bufObj, NvSciBufAttrList *bufAttrList) |
Retrieves the attribute list from an NvSciBuf object. More... | |
NvSciError | NvSciBufObjGetCpuPtr (NvSciBufObj bufObj, void **ptr) |
Gets the CPU virtual address (VA) of the NvSciBufObj. More... | |
NvSciError | NvSciBufObjGetConstCpuPtr (NvSciBufObj bufObj, const void **ptr) |
Gets the CPU virtual address (VA) of the NvSciBufObj. More... | |
NvSciError | NvSciBufObjFlushCpuCacheRange (NvSciBufObj bufObj, uint64_t offset, uint64_t len) |
Flushes the given len bytes at starting offset offset in NvSciBufObj from all CPU-managed caches. More... | |
NvSciError | NvSciBufObjAlloc (NvSciBufAttrList reconciledAttrList, NvSciBufObj *bufObj) |
Allocates an NvSciBuf object that meets all the constraints in the specified reconciled attribute list. More... | |
NvSciError | NvSciBufIpcExportAttrListAndObj (NvSciBufObj bufObj, NvSciBufAttrValAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, void **attrListAndObjDesc, size_t *attrListAndObjDescSize) |
Exports an NvSciBuf attribute list and object into an NvSciIpc-transferable object binary descriptor. More... | |
NvSciError | NvSciBufIpcImportAttrListAndObj (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *attrListAndObjDesc, size_t attrListAndObjDescSize, const NvSciBufAttrList attrList[], size_t count, NvSciBufAttrValAccessPerm minPermissions, int64_t timeoutUs, NvSciBufObj *bufObj) |
This API is invoked by importing process after it receives the binary blob sent by the other process who has created the binary descriptor. More... | |
void | NvSciiBufAttrListAndObjFreeDesc (void *attrListAndObjDescBuf) |
Frees the descriptor used for exporting/importing both attrlist and NvSciBuf Object together. More... | |
NvSciError | NvSciBufObjIpcExport (NvSciBufObj bufObj, NvSciBufAttrValAccessPerm accPerm, NvSciIpcEndpoint ipcEndPoint, NvSciBufObjIpcExportDescriptor *exportData) |
Exports a NvSciBuf object into an NvSciIpc-transferable object binary descriptor. More... | |
NvSciError | NvSciBufObjIpcImport (NvSciIpcEndpoint ipcEndPoint, const NvSciBufObjIpcExportDescriptor *desc, NvSciBufAttrList reconciledAttrList, NvSciBufAttrValAccessPerm minPermissions, int64_t timeoutUs, NvSciBufObj *bufObj) |
Creates a NvSciBuf object based on supplied binary descriptor and returns the NvSciBuf object. More... | |
NvSciError | NvSciBufAttrListIpcExportUnreconciled (NvSciBufAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the input attribute list(s) to an exported attribute list descriptor that can be transported by the application to any remote process as serialized set of bytes over an IPC/IVC/nvIPC channel. More... | |
NvSciError | NvSciBufAttrListIpcExportReconciled (NvSciBufAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the input attribute list(s) to an exported attribute list descriptor that can be transported by the application to any remote process as serialized set of bytes over an IPC/IVC/nvIPC channel. More... | |
NvSciError | NvSciBufAttrListIpcImportUnreconciled (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciBufAttrList *importedUnreconciledAttrList) |
Retrieves the attribute list from the attribute descriptor received over IPC channel. More... | |
NvSciError | NvSciBufAttrListIpcImportReconciled (NvSciBufModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciBufAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciBufAttrList *importedReconciledAttrList) |
Retrieves the attribute list from the attribute descriptor received over IPC channel. More... | |
void | NvSciBufAttrListFreeDesc (void *descBuf) |
Frees the NvSciBuf exported attribute list descriptor. More... | |
NvSciError | NvSciBufModuleOpen (NvSciBufModule *newModule) |
Initializes an instance of the NvSciBuf module within the calling process and provides an NvSciBufModule representing the instance. More... | |
void | NvSciBufModuleClose (NvSciBufModule module) |
Releases an instance of the NvSciBuf module obtained through an earlier call to NvSciBufModuleOpen(). More... | |
Variables | |
static const uint32_t | NvSciBufMajorVersion = 1U |
API Major version number. More... | |
static const uint32_t | NvSciBufMinorVersion = 0U |
API Minor version number. More... | |