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

IPlugin is the general factory interface used by NvNeural's plugin system. More...

#include <nvneural/PluginTypes.h>

Inheritance diagram for nvneural::IPlugin:
nvneural::IRefObject

Public Member Functions

virtual NeuralResult createObject (IRefObject **ppOut, const char *pObjectClass) const noexcept=0
 Creates the designated object using its manifest-specified class name. More...
 
virtual const char * pluginAuthor () const noexcept=0
 Returns a pointer to a UTF-8-encoded author name. More...
 
virtual const char * pluginDescription () const noexcept=0
 Returns a pointer to a UTF-8-encoded plugin description. More...
 
virtual const char * pluginName () const noexcept=0
 Returns a pointer to a UTF-8-encoded plugin name. More...
 
virtual const char * pluginVersion () const noexcept=0
 Returns a pointer to a UTF-8-encoded version string. More...
 
virtual NeuralResult setDefaultLogger (ILogger *pLogger) noexcept=0
 Sets the default logger for the plugin to the specified backend. 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 = 0x1ac7814b0a47cf4ful
 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

- 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.
 
- 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

IPlugin is the general factory interface used by NvNeural's plugin system.

At its simplest, an IPlugin object provides a basic object factory (through createObject), a way to connect a default ILogger for nvneural::DefaultLogger, and some version information for testing and tools.

Plugin objects will typically also implement ILayerPlugin and/or IActivationPlugin.

Member Function Documentation

◆ createObject()

virtual NeuralResult nvneural::IPlugin::createObject ( IRefObject **  ppOut,
const char *  pObjectClass 
) const
pure virtualnoexcept

Creates the designated object using its manifest-specified class name.

Parameters
ppOutReceives a pointer to a newly created object, or nullptr if the name is unknown or creation fails.
pObjectClassObject class name.
Note
For implementers: the newly created object should have a ref count of 1.

◆ pluginAuthor()

virtual const char* nvneural::IPlugin::pluginAuthor ( ) const
pure virtualnoexcept

Returns a pointer to a UTF-8-encoded author name.

This information is used for diagnostic and display purposes only; its formatting is determined by the author of the plugin. The pointer must be valid for at least the full lifespan of this IPlugin instance.

Example plugin author: "NVIDIA Corporation"

◆ pluginDescription()

virtual const char* nvneural::IPlugin::pluginDescription ( ) const
pure virtualnoexcept

Returns a pointer to a UTF-8-encoded plugin description.

This information is used for diagnostic and display purposes only; its formatting is determined by the author of the plugin. The pointer must be valid for at least the full lifespan of this IPlugin instance.

◆ pluginName()

virtual const char* nvneural::IPlugin::pluginName ( ) const
pure virtualnoexcept

Returns a pointer to a UTF-8-encoded plugin name.

This information is used for diagnostic and display purposes only; its formatting is determined by the author of the plugin. The pointer must be valid for at least the full lifespan of this IPlugin instance.

Example plugin name: "Convolution Layers for CUDA"

◆ pluginVersion()

virtual const char* nvneural::IPlugin::pluginVersion ( ) const
pure virtualnoexcept

Returns a pointer to a UTF-8-encoded version string.

This information is used for diagnostic and display purposes only; its formatting is determined by the author of the plugin. The pointer must be valid for at least the full lifespan of this IPlugin instance.

Where possible, prefer version strings that are compatible with semantic versioning as described at https://semver.org/. This is not enforced in the code.

Example plugin version: "10.0.17134-rs4+001"

◆ setDefaultLogger()

virtual NeuralResult nvneural::IPlugin::setDefaultLogger ( ILogger pLogger)
pure virtualnoexcept

Sets the default logger for the plugin to the specified backend.

Classes within a plugin should log to this destination unless otherwise instructed.

Parameters
pLoggerILogger instance to log to.
Note
Be sure to add a reference to this object.

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