HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::ProviderOptionsParser Class Reference

#include <provider_options_utils.h>

Public Member Functions

template<typename ValueParserType >
ProviderOptionsParserAddValueParser (const std::string &name, ValueParserType value_parser)
 
template<typename ValueType >
ProviderOptionsParserAddAssignmentToReference (const std::string &name, ValueType &dest)
 
template<typename EnumType >
ProviderOptionsParserAddAssignmentToEnumReference (const std::string &name, const EnumNameMapping< EnumType > &mapping, EnumType &dest)
 
Status Parse (const ProviderOptions &options) const
 

Detailed Description

Definition at line 70 of file provider_options_utils.h.

Member Function Documentation

template<typename EnumType >
ProviderOptionsParser& onnxruntime::ProviderOptionsParser::AddAssignmentToEnumReference ( const std::string name,
const EnumNameMapping< EnumType > &  mapping,
EnumType &  dest 
)
inline

Adds a parser for a particular provider option value which maps an enumeration name to a value and assigns it to the given reference.

IMPORTANT: This function stores references to the mapping and destination variables. The caller must ensure that the references are valid when Parse() is called!

Parameters
nameThe provider option name.
mappingThe enumeration value to name mapping.
destThe destination variable reference.
Returns
The current ProviderOptionsParser instance.

Definition at line 129 of file provider_options_utils.h.

template<typename ValueType >
ProviderOptionsParser& onnxruntime::ProviderOptionsParser::AddAssignmentToReference ( const std::string name,
ValueType &  dest 
)
inline

Adds a parser for a particular provider option value which converts a value to the right type and assigns it to the given reference.

IMPORTANT: This function stores a reference to the destination variable. The caller must ensure that the reference is valid when Parse() is called!

Parameters
nameThe provider option name.
destThe destination variable reference.
Returns
The current ProviderOptionsParser instance.

Definition at line 105 of file provider_options_utils.h.

template<typename ValueParserType >
ProviderOptionsParser& onnxruntime::ProviderOptionsParser::AddValueParser ( const std::string name,
ValueParserType  value_parser 
)
inline

Adds a parser for a particular provider option value.

Parameters
nameThe provider option name.
value_parserAn object that parses the option value. It should be callable with the following signature and return whether the parsing was successful: Status value_parser(const std::string&)
Returns
The current ProviderOptionsParser instance.

Definition at line 84 of file provider_options_utils.h.

Status onnxruntime::ProviderOptionsParser::Parse ( const ProviderOptions options) const
inline

Parses the given provider options.

Definition at line 141 of file provider_options_utils.h.


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