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

Optional layer interface for C++ code generation. More...

#include <nvneural/CodeGenTypes.h>

Inheritance diagram for nvneural::ICppCodeGenerationLayer:
nvneural::IRefObject

Public Member Functions

virtual NeuralResult generateLayerCpp (ICppCodeGenerationLayerHost *pHost) noexcept=0
 Generates C++ code to configure the layer. More...
 
virtual NeuralResult networkGenerationComplete () noexcept=0
 Indicates the entire network has been generated. 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 = 0xbf8778dfca10c9d5ul
 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

Optional layer interface for C++ code generation.

Layers can implement this interface to override the standard code generation patterns used by ConverenceNG or other tools and provide custom behavior in the resulting code.

Member Function Documentation

◆ generateLayerCpp()

virtual NeuralResult nvneural::ICppCodeGenerationLayer::generateLayerCpp ( ICppCodeGenerationLayerHost pHost)
pure virtualnoexcept

Generates C++ code to configure the layer.

See the ICppCodeGenerationLayerHost interface for details of the generated code.

A failure result from this function will cause the tool to report failure to the user.

◆ networkGenerationComplete()

virtual NeuralResult nvneural::ICppCodeGenerationLayer::networkGenerationComplete ( )
pure virtualnoexcept

Indicates the entire network has been generated.

Layers that rely on out-of-band synchronization to avoid multiple definitions of key types may use this callback to know that all layers have been visited, and can then reset any static variables they used to track this procedure.

This function will be called whether network generation succeeded or failed, but any failure result reported should be treated by the caller as an overall generation error.


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