26 #ifndef NVNEURAL_CODEGENTYPES_H
27 #define NVNEURAL_CODEGENTYPES_H
146 virtual const
IStringList* targetGpuArchitectures() const noexcept = 0;
150 virtual const
char* networkVariableName() const noexcept = 0;
154 virtual const
char* layerVariableName() const noexcept = 0;
158 virtual const
char* resourceDictionaryVariableName() const noexcept = 0;
164 virtual const
char* inputArgumentExpression() const noexcept = 0;
174 virtual
NeuralResult setObjectClass(const
char* pObjectClass) noexcept = 0;
181 virtual
NeuralResult addSourceFragment(const
char* pCppCode) noexcept = 0;
184 virtual
NeuralResult addHeaderFragment(const
char* pCppCode) noexcept = 0;
188 virtual
NeuralResult setInitializationFragment(const
char* pCppCode) noexcept = 0;
205 virtual
NeuralResult setInputFragment(const
char* pCppCode) noexcept = 0;
Fundamental NvNeural data types are declared here.
NeuralResult
NeuralResult is a generic success/failure result type similar to COM HRESULT.
Definition: CoreTypes.h:275
Tool-supplied interface for C++ code generation.
Definition: CodeGenTypes.h:130
virtual bool deploymentMode() const noexcept=0
Returns true if the generator is in "deployment mode." When generating for deployment mode,...
Optional layer interface for C++ code generation.
Definition: CodeGenTypes.h:215
virtual NeuralResult networkGenerationComplete() noexcept=0
Indicates the entire network has been generated.
virtual NeuralResult generateLayerCpp(ICppCodeGenerationLayerHost *pHost) noexcept=0
Generates C++ code to configure the layer.
Base class for all objects, similar to COM's IUnknown.
Definition: CoreTypes.h:343
static const TypeId typeID
Interface TypeId for InterfaceOf purposes.
Definition: CoreTypes.h:352
std::uint64_t TypeId
Every interface must define a unique TypeId. This should be randomized.
Definition: CoreTypes.h:349
Key-value store for creating IResourceDictionary objects.
Definition: CodeGenTypes.h:62
virtual const void * resourceBufferByIndex(std::size_t resourceIndex) const noexcept=0
Returns a pointer to the Nth finalized resource buffer in the object.
virtual std::size_t resourceIdCount() const noexcept=0
Returns the number of finalized resources in the object.
IResourceDictionary::ResourceId ResourceId
Unique identifier for a resource.
Definition: CodeGenTypes.h:65
virtual NeuralResult addResource(ResourceId *pResourceIdOut, const void *pBuffer, std::uint32_t bufferBytes) noexcept=0
Adds a resource to the dictionary, avoiding duplicates.
virtual NeuralResult finalize() noexcept=0
Finalizes the resource collection, allowing for compression and serialization to take place.
virtual std::size_t resourceBufferSizeByIndex(std::size_t resourceIndex) const noexcept=0
Returns the byte count associated with the Nth finalized resource buffer in the object.
virtual ResourceId resourceIdByIndex(std::size_t resourceIndex) const noexcept=0
Returns the Nth resource ID in the object.
Key-value store for binary data such as precompiled kernels.
Definition: CodeGenTypes.h:35
std::uint32_t ResourceId
Unique identifier for a resource.
Definition: CodeGenTypes.h:41
virtual NeuralResult getResource(ResourceId resourceId, const void **ppBufferOut, std::size_t *pBufferSizeOut) const noexcept=0
Retrieves a buffer that was stored in this dictionary.
static const IRefObject::TypeId typeID
Interface TypeId for InterfaceOf purposes.
Definition: CodeGenTypes.h:44
IStringList represents an immutable collection of strings.
Definition: CoreTypes.h:1079