NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::IResourceDictionary Class Referenceabstract

Key-value store for binary data such as precompiled kernels. More...

#include <nvneural/CodeGenTypes.h>

Inheritance diagram for nvneural::IResourceDictionary:
nvneural::IRefObject

Public Types

using ResourceId = std::uint32_t
 Unique identifier for a resource. More...
 
- Public Types inherited from nvneural::IRefObject
using RefCount = std::uint32_t
 Typedef used to track the number of active references to an object.
 
using TypeId = std::uint64_t
 Every interface must define a unique TypeId. This should be randomized.
 

Public Member Functions

virtual NeuralResult getResource (ResourceId resourceId, const void **ppBufferOut, std::size_t *pBufferSizeOut) const noexcept=0
 Retrieves a buffer that was stored in this dictionary. More...
 
- Public Member Functions inherited from nvneural::IRefObject
virtual RefCount addRef () const noexcept=0
 Increments the object's reference count. More...
 
virtual const void * queryInterface (TypeId interface) const noexcept=0
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
virtual void * queryInterface (TypeId interface) noexcept=0
 Retrieves a new object interface pointer. More...
 
virtual RefCount release () const noexcept=0
 Decrements the object's reference count and destroy the object if the reference count reaches zero. More...
 

Static Public Attributes

static const IRefObject::TypeId typeID = 0xf8aa3818beae88d2ul
 Interface TypeId for InterfaceOf purposes.
 
- Static Public Attributes inherited from nvneural::IRefObject
static const TypeId typeID = 0x14ecc3f9de638e1dul
 Interface TypeId for InterfaceOf purposes.
 

Additional Inherited Members

- Protected Member Functions inherited from nvneural::IRefObject
virtual ~IRefObject ()=default
 A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
 

Detailed Description

Key-value store for binary data such as precompiled kernels.

Member Typedef Documentation

◆ ResourceId

Unique identifier for a resource.

Depending on the specific dictionary implementation, multiple IDs may point to the same binary data, but each ID will reference only one resource in the object.

Member Function Documentation

◆ getResource()

virtual NeuralResult nvneural::IResourceDictionary::getResource ( ResourceId  resourceId,
const void **  ppBufferOut,
std::size_t *  pBufferSizeOut 
) const
pure virtualnoexcept

Retrieves a buffer that was stored in this dictionary.

Parameters
resourceIdHandle identifying the resource
ppBufferOutAddress of a const void* that will point to the buffer
pBufferSizeOutAddress of a size_t that will contain the buffer size in bytes

If the resource ID is invalid, neither ppBufferOut nor pBufferSizeOut will be updated.


The documentation for this class was generated from the following file: