Represents a serialized parameter block in a model definition.
More...
#include <nvneural/CoreTypes.h>
|
|
virtual NeuralResult | getInteger (const char *pParameterName, std::int32_t *pIntOut) const noexcept=0 |
| Retrieves a signed integer value. More...
|
|
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(). More...
|
|
virtual NeuralResult | getFloat (const char *pParameterName, float *pFloatOut) const noexcept=0 |
| Retrieves a floating-point value. More...
|
|
virtual NeuralResult | getString (const char *pParameterName, const char **pStringOut) const noexcept=0 |
| Retrieves a UTF-8 string value. More...
|
|
virtual NeuralResult | getDimension (const char *pParameterName, TensorDimension *pDimOut) const noexcept=0 |
| Retrieves a tensor dimension. More...
|
|
|
virtual NeuralResult | setInteger (const char *pParameterName, std::int32_t value) noexcept=0 |
| Saves an integer. More...
|
|
virtual NeuralResult | setSize (const char *pParameterName, std::size_t value) noexcept=0 |
| Saves an unsigned integer that can represent the result of sizeof(). More...
|
|
virtual NeuralResult | setFloat (const char *pParameterName, float value) noexcept=0 |
| Saves a floating-point value. More...
|
|
virtual NeuralResult | setString (const char *pParameterName, const char *pString) noexcept=0 |
| Saves a UTF-8 string value. More...
|
|
virtual NeuralResult | setDimension (const char *pParameterName, TensorDimension value) noexcept=0 |
| Saves a tensor dimension. More...
|
|
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...
|
|
|
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.
|
|
virtual | ~IRefObject ()=default |
| A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
|
|
Represents a serialized parameter block in a model definition.
Layers should read their parameters from this object when deserializing a network.
- Warning
- Some backing stores may implement type checking, but this is not guaranteed.
◆ getDimension()
Retrieves a tensor dimension.
Tensor dimensions are stored as strings, and parsed using TensorDimensionToString as described in CoreHelpers.h. The IMAGE mode is used for parsing; use getString and parse manually if you require tensor ordering. Almost all persisted dimensions in existing networks are parsed using IMAGE mode; when porting Creo Neural code, this is probably what you need.
- Parameters
-
pParameterName | Name of parameter to query |
pDimOut | Pointer to a variable receiving the parameter value |
◆ getFloat()
virtual NeuralResult nvneural::IParameterNode::getFloat |
( |
const char * |
pParameterName, |
|
|
float * |
pFloatOut |
|
) |
| const |
|
pure virtualnoexcept |
Retrieves a floating-point value.
- Parameters
-
pParameterName | Name of parameter to query |
pFloatOut | Pointer to a variable receiving the parameter value. |
◆ getInteger()
virtual NeuralResult nvneural::IParameterNode::getInteger |
( |
const char * |
pParameterName, |
|
|
std::int32_t * |
pIntOut |
|
) |
| const |
|
pure virtualnoexcept |
Retrieves a signed integer value.
- Parameters
-
pParameterName | Name of parameter to query |
pIntOut | Pointer to a variable receiving the parameter value. |
◆ getSize()
virtual NeuralResult nvneural::IParameterNode::getSize |
( |
const char * |
pParameterName, |
|
|
std::size_t * |
pSizeOut |
|
) |
| const |
|
pure virtualnoexcept |
Retrieves an unsigned integer value that can represent the result of sizeof().
- Parameters
-
pParameterName | Name of parameter to query |
pSizeOut | Pointer to a variable receiving the parameter value. |
◆ getString()
virtual NeuralResult nvneural::IParameterNode::getString |
( |
const char * |
pParameterName, |
|
|
const char ** |
pStringOut |
|
) |
| const |
|
pure virtualnoexcept |
Retrieves a UTF-8 string value.
- Parameters
-
pParameterName | Name of parameter to query |
pStringOut | Pointer to a variable receiving the parameter value. |
◆ setDimension()
Saves a tensor dimension.
- Parameters
-
pParameterName | Name of parameter to set |
value | Value to save |
◆ setFloat()
virtual NeuralResult nvneural::IParameterNode::setFloat |
( |
const char * |
pParameterName, |
|
|
float |
value |
|
) |
| |
|
pure virtualnoexcept |
Saves a floating-point value.
- Parameters
-
pParameterName | Name of parameter to set |
value | Value to save |
◆ setInteger()
virtual NeuralResult nvneural::IParameterNode::setInteger |
( |
const char * |
pParameterName, |
|
|
std::int32_t |
value |
|
) |
| |
|
pure virtualnoexcept |
Saves an integer.
- Parameters
-
pParameterName | Name of parameter to set |
value | Value to save |
◆ setSize()
virtual NeuralResult nvneural::IParameterNode::setSize |
( |
const char * |
pParameterName, |
|
|
std::size_t |
value |
|
) |
| |
|
pure virtualnoexcept |
Saves an unsigned integer that can represent the result of sizeof().
- Parameters
-
pParameterName | Name of parameter to set |
value | Value to save |
◆ setString()
virtual NeuralResult nvneural::IParameterNode::setString |
( |
const char * |
pParameterName, |
|
|
const char * |
pString |
|
) |
| |
|
pure virtualnoexcept |
Saves a UTF-8 string value.
- Parameters
-
pParameterName | Name of parameter to set |
pString | Value to save |
The documentation for this class was generated from the following file: