26 #ifndef NVNEURAL_CORETYPES_H
27 #define NVNEURAL_CORETYPES_H
32 #include <type_traits>
34 #include <initializer_list>
41 class INetworkBackend;
42 class INetworkRuntime;
110 ||
layout != other.layout;
116 return !(*
this != other);
124 return std::tie(
elementType,
layout) < std::tie(other.elementType, other.layout);
129 static_assert(
sizeof(TensorFormat) ==
sizeof(std::uint32_t),
"TensorFormat structure packing not as expected");
179 return (
n == other.
n) && (
c == other.
c) && (
h == other.
h) && (
w == other.
w);
185 return !(*
this == other);
197 static_assert(std::is_standard_layout<TensorDimension>::value,
"TensorDimension must be standard layout");
218 *
this =
Float16(
static_cast<float>(value));
230 operator float()
const;
286 return result <= NeuralResult::Success;
291 return result >= NeuralResult::Failure;
401 template<typename TInterface>
510 virtual
bool memManagedExternally() const noexcept = 0;
517 virtual const
void* data() const noexcept = 0;
623 class MemoryHandle__type;
669 SkipConcatenation = 0xdd13d58fbabb2f5bul,
677 FuseBatchNormAndConvolution = 0xeaffe6d9a4acfdc9ul,
735 void* pDeviceDestination,
738 const
void* pDeviceSource,
746 virtual
NeuralResult setDeviceMemory(
void* pDeviceDestination, std::uint8_t value, std::
size_t byteCount) noexcept = 0;
749 virtual
NeuralResult copyMemoryD2D(
void* pDeviceDestination, const
void* pDeviceSource, std::
size_t byteCount) noexcept = 0;
752 virtual
NeuralResult copyMemoryH2D(
void* pDeviceDestination, const
void* pHostSource, std::
size_t byteCount) noexcept = 0;
755 virtual
NeuralResult copyMemoryD2H(
void* pHostDestination, const
void* pDeviceSource, std::
size_t byteCount) noexcept = 0;
819 virtual
void* getAddressForMemoryBlock(
MemoryHandle handle) noexcept = 0;
828 virtual
size_t getSizeForMemoryBlock(
MemoryHandle handle) noexcept = 0;
873 const
void** ppUploadedWeightsOut,
877 const
void* pWeightsData,
878 std::
size_t weightsDataSize,
881 bool memManagedExternally) noexcept = 0;
1072 virtual
ILayer* getLayerByIndex(
size_t layerIndex) const noexcept = 0;
1096 virtual const
char* getStringByIndex(
size_t stringIndex) const noexcept = 0;
1104 virtual
size_t getStringSizeByIndex(
size_t stringIndex) const noexcept = 0;
1170 virtual
size_t layerCount() const noexcept = 0;
1176 virtual
ILayer* getLayerByName(const
char* pLayerName) const noexcept = 0;
1263 virtual
NeuralResult mapLayerAsWeightsData(const
ILayer* pDataLayer, const
ILayer* pWeightsLayer, const
char* pWeightsName) noexcept = 0;
1288 const
char* pWeightsName,
1489 namespace common_categories
1737 typedef bool (*PrototypeRuntimeValidatorFunction)(
const INetwork* pNetwork);
1828 virtual const
ActivationDesc* exportedActivationByIndex(std::
size_t index) const noexcept = 0;
1831 virtual std::
size_t exportedLayersCount() const noexcept = 0;
1838 virtual const
LayerDesc* exportedLayerByIndex(std::
size_t index) const noexcept = 0;
1841 virtual std::
size_t exportedFusingRulesCount() const noexcept = 0;
1848 virtual const
FusingRule* exportedFusingRuleByIndex(std::
size_t index) const noexcept = 0;
1851 virtual std::
size_t exportedPrototypesCount() const noexcept = 0;
1858 virtual const
PrototypeDesc* exportedPrototypeByIndex(std::
size_t index) const noexcept = 0;
1865 virtual PrototypeRuntimeValidatorFunction exportedPrototypeRuntimeValidatorByIndex(std::
size_t index) const noexcept = 0;
1880 virtual
bool isPrototypeRuntimeCompatible(const
char* pPrototypeObjectClass, const
INetwork* pNetwork) const = 0;
1983 virtual std::size_t
height() const noexcept = 0;
1986 virtual std::
size_t width() const noexcept = 0;
1989 virtual std::
size_t channels() const noexcept = 0;
1994 virtual std::
size_t elements() const noexcept = 0;
1999 virtual std::uint8_t* data() noexcept = 0;
2002 virtual const std::uint8_t* data() const noexcept = 0;
@ Tensor
This order is used for parameters that typically describe tensor dimensions.
MemorySemantic
Describes the intended purpose of allocated GPU memory.
Definition: CoreTypes.h:631
@ Ephemeral
Memory used for short-lived scratch computations.
@ Unspecified
Generic allocation type, not tagged for any specific use.
@ Weights
Memory used for weights data; typically long-lived.
constexpr bool failed(NeuralResult result) noexcept
Helper function akin to COM's FAILED() macro.
Definition: CoreTypes.h:289
const std::uint32_t ApiVersion
API version set.
Definition: CoreTypes.h:52
TensorDataType
Enumeration describing common tensor element types.
Definition: CoreTypes.h:60
@ Float
32-bit floating point elements (float)
@ CompressedPng
NV Internal: Used to transit png like tensor between host and inference target.
@ CustomBase
Custom entries in this enum should use IDs numerically higher than this value.
@ Invalid
Invalid value used to guard against uninitialized variables.
@ UncompressedRgb
NV Internal: Used to send uncompressed R8G8B8 data between tools.
@ TestOnly
Only used in a testing environment.
@ Half
16-bit floating point elements (__half)
ImageSpace
ImageSpace values refer to specific tensor representations of image data.
Definition: CoreTypes.h:300
@ RgbNormalized
RGB normalized to unit range; range is [0, 1].
@ RgbCentered
RGB centered around 0; range is [-1, 1].
TensorDataLayout
Enumeration describing common tensor data layouts.
Definition: CoreTypes.h:77
LayerInputType
This enum describes what type a particular input is for the layer.
Definition: CoreTypes.h:1518
@ Primary
Most inputs are "primary" inputs.
@ Secondary
Represents an input that is typically provided by the weights system.
@ PrimaryInfinite
Layers like concat and element_wise can take arbitrary numbers of inputs. Define one of these.
MemoryHandle__type * MemoryHandle
Opaque typedef used to represent INetworkBackend memory handles.
Definition: CoreTypes.h:626
constexpr bool succeeded(NeuralResult result) noexcept
Helper function akin to COM's SUCCEEDED() macro.
Definition: CoreTypes.h:284
NetworkBackendId
Enumeration describing common network backends.
Definition: CoreTypes.h:239
@ Cpu
Pure CPU code, no GPU involvement (largely unused)
@ Cuda
CUDA/cuDNN backend.
ParamType
This enum describes what type a particular parameter.
Definition: CoreTypes.h:1311
@ MaxParam
Should also be the next number for new non-custom types.
CompilationLevel
This enum represent kernel type contained by a prototype layer.
Definition: CoreTypes.h:1688
@ JitIntermediate
Examples: PTX, SPIR-V, or a compiled HLSL shader.
@ CompiledBinary
Example: SASS.
@ JitSource
Examples: CUDA C++, GLSL, or HLSL.
ActivationFunctionId
Enumeration describing common activation functions.
Definition: CoreTypes.h:259
@ LeakySigmoid
Leaky sigmoid ([0] = negative slope, [1] = positive slope)
@ Sine
Sine (also known as SIREN)
@ LeakyTanh
Leaky tanh ([0] = negative slope, [1] = positive slope)
@ LeakyReLU
Leaky ReLU ([0] = slope)
@ Tanh
Hyperbolic tangent.
@ ReLU
ReLU ([0] = minimum value to return)
NeuralResult
NeuralResult is a generic success/failure result type similar to COM HRESULT.
Definition: CoreTypes.h:275
@ Success
Operation succeeded. Generic result.
@ Unsupported
Operation failed and will not pass on a retry (not implemented or logic error).
@ Failure
Operation failed. Generic result.
Float16 is a CPU-side implementation of half-precision floating point (aka FP16).
Definition: CoreTypes.h:201
Float16()=default
Default constructor, initializes to zero.
Float16 & operator=(double value)
Assignment operator from float/double.
Definition: CoreTypes.h:216
std::uint16_t data
Sized integer containing the float16 value.
Definition: CoreTypes.h:204
IActivationFunction represents a functor that can perform a specific activation function.
Definition: CoreTypes.h:2015
virtual const char * serializedType() const noexcept=0
Retrieves the type of the activation function.
virtual NeuralResult setNetworkRuntime(INetworkRuntime *pNetwork) noexcept=0
Sets the owning network runtime. Will be called before any call to invoke.
virtual NeuralResult invoke(ILayer *pLayer) noexcept=0
Performs activation for a layer.
The IApiVersionQuery interface provides this object's compiled-in ApiVersion.
Definition: CoreTypes.h:483
virtual std::uint32_t apiVersion() const noexcept=0
Returns the value of ApiVersion used to build this object.
IBackendDeviceIdentifier is an opaque identifier for an active GPU.
Definition: CoreTypes.h:603
virtual const char * getDeviceName() const noexcept=0
Retrieves the name of this GPU.
virtual NeuralResult getDeviceIdentifiers(std::uint64_t *pUuidLow, std::uint64_t *pUuidHigh) const noexcept=0
Retrieves a pair of values that uniquely identify this GPU on the local system.
Common class registry for instantiating objects and collecting plugin-provided descriptors.
Definition: CoreTypes.h:1801
virtual NeuralResult importPluginLoader(IPluginLoader *pPluginLoader)=0
Imports all plugins loaded by a plugin loader.
virtual NeuralResult importPlugin(IPlugin *pPlugin)=0
Imports everything (layer, activation, fusing rules, and prototypes) registered with a single plugin.
virtual std::size_t exportedActivationsCount() const noexcept=0
Returns the count of registered activation functions.
IImage represents a bitmap image in system memory.
Definition: CoreTypes.h:1972
virtual std::size_t height() const noexcept=0
Returns the height of the image in pixels.
virtual NeuralResult resize(std::size_t height, std::size_t width, std::size_t channels) noexcept=0
Clears the image and reserves storage.
ILayer is the base class for neural network layers.
Definition: LayerTypes.h:59
ILayerList represents an immutable collection of ILayer pointers.
Definition: CoreTypes.h:1060
virtual size_t layerCount() const noexcept=0
Returns the number of layers in this collection.
ILibraryContext is a generic library handle wrapper.
Definition: CoreTypes.h:571
std::uint64_t LibraryId
Library IDs should be generated randomly similar to interface IDs.
Definition: CoreTypes.h:577
virtual LibraryId libraryId() const noexcept=0
Retrieves a stable identifier for the library being tracked in this object.
Logger interface class.
Definition: CoreTypes.h:414
virtual VerbosityLevel verbosity() const noexcept=0
Retrieves the current verbosity level.
std::int32_t VerbosityLevel
Typedef for verbosity levels.
Definition: CoreTypes.h:424
INetworkBackend2 is a revision of INetworkBackend.
Definition: CoreTypes.h:958
virtual NeuralResult allocateMemoryBlock(MemoryHandle *pHandle, size_t byteCount, const char *pTrackingKey) noexcept=0
Allocates a memory block of the requested size and allows tracking of the memory block using a user-d...
virtual NeuralResult setMemoryTrackingKey(const char *pTrackingKey, const char *pTrackingSubkey) noexcept=0
Sets a potential tracking key.
virtual NeuralResult getMemoryTrackingKeys(IStringList **ppKeysOut) noexcept=0
Returns an IStringList of the currently tracked keys.
virtual const MemoryTrackingData * getMemoryTrackingData(const char *pTrackingKey, const char *pTrackingSubkey) const noexcept=0
Compiles and returns memory data for the given key.
virtual NeuralResult getMemoryTrackingSubkeys(const char *pTrackingKey, IStringList **ppKeysOut) noexcept=0
Returns an IStringList of the subkeys of given tracking key.
INetworkBackend is a runtime-specific interface for CUDA, DirectX, or other system- specific operatio...
Definition: CoreTypes.h:643
virtual bool supportsOptimization(OptimizationCapability optimization) const noexcept=0
Returns true if the indicated optimization is applicable to this backend.
virtual const IBackendDeviceIdentifier * deviceIdentifier() const noexcept=0
Retrieves an opaque device identifier object corresponding to the device associated with this backend...
virtual NeuralResult allocateMemoryBlock(MemoryHandle *pHandle, size_t byteCount) noexcept=0
Allocates a memory block of the requested size.
virtual NeuralResult initializeFromDeviceIdentifier(const IBackendDeviceIdentifier *pDeviceIdentifier) noexcept=0
Initializes the backend to point to a specific device identifier.
OptimizationCapability
List of optional optimizations supported by backends.
Definition: CoreTypes.h:663
virtual NeuralResult initializeFromDeviceOrdinal(std::uint32_t deviceOrdinal) noexcept=0
Initializes the backend to point to a specific device ordinal.
INetworkDebugger defines a callback interface for network inference.
Definition: NetworkTypes.h:51
INetworkDebuggerList represents an immutable collection of INetworkDebugger pointers.
Definition: CoreTypes.h:1111
virtual size_t debuggerCount() const noexcept=0
INetwork is the public interface to Network.
Definition: NetworkTypes.h:119
INetworkRuntime is a subset of the basic network interface that is accessible from layer classes duri...
Definition: CoreTypes.h:1129
virtual const char * networkName() const noexcept=0
Retrieves the name of this network as a UTF-8 string.
Represents a serialized parameter block in a model definition.
Definition: CoreTypes.h:1889
virtual NeuralResult setInteger(const char *pParameterName, std::int32_t value) noexcept=0
Saves an integer.
virtual NeuralResult getString(const char *pParameterName, const char **pStringOut) const noexcept=0
Retrieves a UTF-8 string value.
virtual NeuralResult setString(const char *pParameterName, const char *pString) noexcept=0
Saves a UTF-8 string value.
virtual NeuralResult getSize(const char *pParameterName, std::size_t *pSizeOut) const noexcept=0
Retrieves an unsigned integer value that can represent the result of sizeof().
virtual NeuralResult setFloat(const char *pParameterName, float value) noexcept=0
Saves a floating-point value.
virtual NeuralResult getFloat(const char *pParameterName, float *pFloatOut) const noexcept=0
Retrieves a floating-point value.
virtual NeuralResult getDimension(const char *pParameterName, TensorDimension *pDimOut) const noexcept=0
Retrieves a tensor dimension.
virtual NeuralResult setSize(const char *pParameterName, std::size_t value) noexcept=0
Saves an unsigned integer that can represent the result of sizeof().
virtual NeuralResult setDimension(const char *pParameterName, TensorDimension value) noexcept=0
Saves a tensor dimension.
virtual NeuralResult getInteger(const char *pParameterName, std::int32_t *pIntOut) const noexcept=0
Retrieves a signed integer value.
IPlugin is the general factory interface used by NvNeural's plugin system.
Definition: PluginTypes.h:41
Platform-agnostic plugin loader interface.
Definition: PluginTypes.h:200
Base class for all objects, similar to COM's IUnknown.
Definition: CoreTypes.h:343
virtual void * queryInterface(TypeId interface) noexcept=0
Retrieves a new object interface pointer.
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
std::uint32_t RefCount
Typedef used to track the number of active references to an object.
Definition: CoreTypes.h:346
virtual RefCount addRef() const noexcept=0
Increments the object's reference count.
virtual RefCount release() const noexcept=0
Decrements the object's reference count and destroy the object if the reference count reaches zero.
IRuntimeOptionsHost is an interface that provides runtime option communication from the layer to the ...
Definition: CoreTypes.h:544
virtual NeuralResult optionsRefreshed(const ILayer *pLayer) noexcept=0
Layers should call this when the options have changed, but not when the value for the option has chan...
IStringList represents an immutable collection of strings.
Definition: CoreTypes.h:1079
virtual size_t stringCount() const noexcept=0
IWeightsData represents a binary buffer provided by IWeightsLoader.
Definition: CoreTypes.h:494
virtual NetworkBackendId backendId() const noexcept=0
Returns the backend for which this weights data is relevant.
IWeightsLoader is an interface that provides weights to layers.
Definition: CoreTypes.h:525
virtual NeuralResult getWeightsForLayer(IWeightsData **ppWeightsDataOut, const INetworkRuntime *pNetwork, const ILayer *pLayer, const char *pName) const noexcept=0
Retrieves a weights data buffer in a canonical format.
const char *const Analysis
Category for visualization and analysis layers.
Definition: CoreTypes.h:1502
const char *const Examples
Category for demonstration layers.
Definition: CoreTypes.h:1498
const char *const DataImageProcessing
Category for layers that do image processing.
Definition: CoreTypes.h:1499
const char *const Fused
Category for layers that fuse multiple operations.
Definition: CoreTypes.h:1497
const char *const Training
Category for layers that represent training-only concepts.
Definition: CoreTypes.h:1493
const char *const Shape
Category for layers that adjust tensor shape.
Definition: CoreTypes.h:1495
const char *const InputOutput
Category for layers that interact with their host application.
Definition: CoreTypes.h:1492
const char *const DevelopmentAids
Category for layers that aid framework development.
Definition: CoreTypes.h:1501
const char *const DefaultHidden
Category for layers that should be hidden in the editor by default.
Definition: CoreTypes.h:1503
const char *const General
Category for layers that don't fit other categories.
Definition: CoreTypes.h:1491
const char *const Upsampling
Category for layers that upscale their input.
Definition: CoreTypes.h:1496
const char *const NoActivation
Category for layers that do not support activation.
Definition: CoreTypes.h:1504
const char *const DomainSpecific
Category for layers that implement specialized operations.
Definition: CoreTypes.h:1500
const char *const FormatConversion
Category for layers that permute and shuffle data.
Definition: CoreTypes.h:1494
Structure describing an activation function (IActivationFunction) for tool interfaces and network bui...
Definition: CoreTypes.h:1634
std::size_t structSize
This is the sizeof() this struct.
Definition: CoreTypes.h:1638
ActivationFunctionId activationFunction
This is the activation function ID implemented by this activation function.
Definition: CoreTypes.h:1663
std::size_t numParameters
This is the number of parameters supported for this activation.
Definition: CoreTypes.h:1678
TensorFormat tensorFormat
This is the tensor format supported by this activation function.
Definition: CoreTypes.h:1674
NetworkBackendId backend
This is the backend identifier supported by this instance of the activation function.
Definition: CoreTypes.h:1670
const char * pDocumentation
An optional human-readable descriptive text.
Definition: CoreTypes.h:1653
const ParamDesc * pParameters
This is the pointer to the contiguous memory of ParamDesc structs.
Definition: CoreTypes.h:1683
const char * pSerializedName
This is the name used to represent the activation function in serialized form.
Definition: CoreTypes.h:1649
const char * pObjectClass
This is the programmatic class name used to instantiate the activation object through the IPlugin::cr...
Definition: CoreTypes.h:1644
const char * pDisplayName
An optional human-readable layer name.
Definition: CoreTypes.h:1660
For implementers, this struct needs to be replicated in each xParamTypeDesc right now.
Definition: CoreTypes.h:1326
ParamType paramType
This for additional safety and reference. Should replicate the xParamDesc::paramType.
Definition: CoreTypes.h:1332
std::size_t structSize
This is the sizeof() the xParamTypeDesc struct that contains this struct.
Definition: CoreTypes.h:1329
The DimensionParamTypeDesc further describes a parameter for the plugin and is pointed to from the hi...
Definition: CoreTypes.h:1356
const ParamDependencyDesc * pParamDependencies
This is the array of parameter dependency with paramDependenciesCount members.
Definition: CoreTypes.h:1377
std::size_t paramDependenciesCount
This is the amount of parameter dependencies contained in the memory block.
Definition: CoreTypes.h:1367
std::size_t minDimensions
This is the minimum amount of dimensions that are needed.
Definition: CoreTypes.h:1364
BaseParamTypeDesc baseDesc
This is the base param desc struct which all xParamTypeDesc must have.
Definition: CoreTypes.h:1358
std::size_t maxDimensions
This is the maximum amount of dimensions that are valid.
Definition: CoreTypes.h:1361
The EnumParamTypeDesc further describes a parameter for the plugin and is pointed to from the higher ...
Definition: CoreTypes.h:1391
BaseParamTypeDesc baseDesc
This is the base param desc struct which all xParamTypeDesc must have.
Definition: CoreTypes.h:1393
const char *const * pOptions
This is the array of the enums with optionCount members.
Definition: CoreTypes.h:1402
const ParamDependencyDesc * pParamDependencies
This is the array of parameter dependency with paramDependenciesCount members.
Definition: CoreTypes.h:1415
std::size_t optionCount
This is the amount of enum options contained in the memory block.
Definition: CoreTypes.h:1396
std::size_t paramDependenciesCount
This is the amount of parameter dependencies contained in the memory block.
Definition: CoreTypes.h:1405
Defines a fusing rule that can be applied during model loading.
Definition: CoreTypes.h:1781
std::uint32_t syntaxVersion
This is the version number of the fusing rule grammar.
Definition: CoreTypes.h:1784
const char * pFusingRule
This is the fusing rule text, encoded in UTF-8.
Definition: CoreTypes.h:1788
Helper template to aid retrieval of interface IDs.
Definition: CoreTypes.h:403
This structure describes an ILayer for tools and network builders.
Definition: CoreTypes.h:1554
NetworkBackendId backend
This is the backend identifier supported by this instance of the layer type.
Definition: CoreTypes.h:1597
const char * pObjectClass
This is the programmatic class name used to instantiate the layer object through the IPlugin::createO...
Definition: CoreTypes.h:1566
std::size_t numCategories
This is the number of categories.
Definition: CoreTypes.h:1587
bool generatesOutput
Describes whether the primary output from this layer generates output.
Definition: CoreTypes.h:1614
const ParamDesc * pParameters
This is the pointer to the array of ParamDesc structs.
Definition: CoreTypes.h:1626
const char * pDisplayName
An optional human-readable layer name.
Definition: CoreTypes.h:1583
std::size_t numInputs
This is the number of inputs supported by this layer.
Definition: CoreTypes.h:1606
const LayerInputDesc * pInputs
This is a pointer to the array of LayerInputDesc structs which define the inputs to this layer.
Definition: CoreTypes.h:1611
TensorFormat tensorFormat
This is a tensor format supported by this instance of the layer type.
Definition: CoreTypes.h:1602
const char * pDocumentation
An optional human-readable descriptive text.
Definition: CoreTypes.h:1578
const char * pSerializedName
This is the name used to represent the layer type in serialized form.
Definition: CoreTypes.h:1572
const char *const * ppCategories
An optional array of strings which denote categories that the host can use to organize this layer.
Definition: CoreTypes.h:1592
std::size_t numParameters
This is the number of parameters supported for this layer.
Definition: CoreTypes.h:1620
std::size_t structSize
This is the sizeof() this struct.
Definition: CoreTypes.h:1558
Structure describing details of an object's memory allocation behavior.
Definition: CoreTypes.h:931
std::size_t structSize
This is the sizeof() this struct.
Definition: CoreTypes.h:936
std::size_t peakCommittedMemory
This is the high water mark of on device memory (committed memory).
Definition: CoreTypes.h:939
std::size_t persistingCommittedMemory
This is the high water mark of on device memory (committed memory) that persists after a network is l...
Definition: CoreTypes.h:947
std::size_t peakRequestedMemory
This is the high water mark of requested memory.
Definition: CoreTypes.h:943
std::size_t persistingRequestedMemory
This is the high water mark of requested memory that persists after a network finishes an inference r...
Definition: CoreTypes.h:952
The ParamDependencyDesc describe a parameter dependency on parameter named pParamName with value pPar...
Definition: CoreTypes.h:1337
const char * pParamValue
The parameter value, as an UTF-8 string, associated with the dependency.
Definition: CoreTypes.h:1342
const char * pParamName
The parameter name, pName from ParamDesc, associated with the dependency.
Definition: CoreTypes.h:1339
ParamDesc describes a parameter for the plugin, giving it a name, default value, type,...
Definition: CoreTypes.h:1449
ParamType paramType
This is a enum that describes this parameter.
Definition: CoreTypes.h:1468
const BaseParamTypeDesc * pParamTypeDetails
This is an optional struct that give greater detail to the paramType if needed, for instance,...
Definition: CoreTypes.h:1480
std::size_t structSize
This is the sizeof() this struct. It is used for versioning.
Definition: CoreTypes.h:1451
const char * pName
This is the name of the parameter, usually a friendly name.
Definition: CoreTypes.h:1457
const char * pDefault
This is the default value of the parameter.
Definition: CoreTypes.h:1463
const char * pDocumentation
An optional human-readable descriptive text.
Definition: CoreTypes.h:1474
This structure represent a prototype layer version (backend, tensor format and kernel type),...
Definition: CoreTypes.h:1697
TensorFormat tensorFormat
This is the tensor format supported by this prototype layer.
Definition: CoreTypes.h:1726
const char * pSerializedName
This is the name used to represent the prototype type in serialized form.
Definition: CoreTypes.h:1713
NetworkBackendId backend
This is the backend identifier supported by this instance of the prototype layer.
Definition: CoreTypes.h:1723
std::size_t structSize
This is the sizeof() this struct.
Definition: CoreTypes.h:1701
CompilationLevel compilationLevel
This is the compilation level of the contained kernel.
Definition: CoreTypes.h:1729
const char * pObjectClass
This is the programmatic class name used to instantiate the prototype object through the IPlugin::cre...
Definition: CoreTypes.h:1707
const char * pDisplayName
An optional human-readable prototype name.
Definition: CoreTypes.h:1718
The StringParamTypeDesc further describes a parameter for the plugin and is pointed to from the highe...
Definition: CoreTypes.h:1423
bool supportsMultilineTextbox
This is a UI hint for the size of the text box of the string.
Definition: CoreTypes.h:1429
const ParamDependencyDesc * pParamDependencies
This is the array of parameter dependency with paramDependenciesCount members.
Definition: CoreTypes.h:1442
BaseParamTypeDesc baseDesc
This is the base param desc struct which all xParamTypeDesc must have.
Definition: CoreTypes.h:1425
std::size_t paramDependenciesCount
This is the amount of parameter dependencies contained in the memory block.
Definition: CoreTypes.h:1432
TensorDimension describes the dimensions of a four-dimensional image tensor.
Definition: CoreTypes.h:136
size_t c
C dimension (channel)
Definition: CoreTypes.h:138
TensorDimension & operator=(const TensorDimension ©From)
Copy assignment operator.
Definition: CoreTypes.h:167
bool operator!=(const TensorDimension &other) const
Inequality operator.
Definition: CoreTypes.h:183
size_t h
H dimension (height)
Definition: CoreTypes.h:139
~TensorDimension()=default
Trivial destructor.
TensorDimension()=default
Default constructor. Initializes all members to zero.
TensorDimension(size_t N, size_t C, size_t H, size_t W)
Direct constructor, specifying all members at once.
Definition: CoreTypes.h:146
size_t w
W dimension (width)
Definition: CoreTypes.h:140
bool operator==(const TensorDimension &other) const
Equality operator.
Definition: CoreTypes.h:177
TensorDimension(const TensorDimension ©From)
Copy constructor.
Definition: CoreTypes.h:158
std::size_t elementCount() const
Returns the number of elements in a tensor with these dimensions.
Definition: CoreTypes.h:190
size_t n
N dimension (batch)
Definition: CoreTypes.h:137