HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::CustomOpConfigs Struct Reference

Class that represents session configuration entries for one or more custom operators. More...

#include <onnxruntime_cxx_api.h>

Public Member Functions

 CustomOpConfigs ()=default
 
 ~CustomOpConfigs ()=default
 
 CustomOpConfigs (const CustomOpConfigs &)=default
 
CustomOpConfigsoperator= (const CustomOpConfigs &)=default
 
 CustomOpConfigs (CustomOpConfigs &&o)=default
 
CustomOpConfigsoperator= (CustomOpConfigs &&o)=default
 
CustomOpConfigsAddConfig (const char *custom_op_name, const char *config_key, const char *config_value)
 Adds a session configuration entry/value for a specific custom operator. More...
 
const std::unordered_map
< std::string, std::string > & 
GetFlattenedConfigs () const
 Returns a flattened map of custom operator configuration entries and their values. More...
 

Detailed Description

Class that represents session configuration entries for one or more custom operators.

Example: Ort::CustomOpConfigs op_configs; op_configs.AddConfig("my_custom_op", "device_type", "CPU");

Passed to Ort::SessionOptions::RegisterCustomOpsLibrary.

Definition at line 786 of file onnxruntime_cxx_api.h.

Constructor & Destructor Documentation

Ort::CustomOpConfigs::CustomOpConfigs ( )
default
Ort::CustomOpConfigs::~CustomOpConfigs ( )
default
Ort::CustomOpConfigs::CustomOpConfigs ( const CustomOpConfigs )
default
Ort::CustomOpConfigs::CustomOpConfigs ( CustomOpConfigs &&  o)
default

Member Function Documentation

CustomOpConfigs & Ort::CustomOpConfigs::AddConfig ( const char *  custom_op_name,
const char *  config_key,
const char *  config_value 
)
inline

Adds a session configuration entry/value for a specific custom operator.

Parameters
custom_op_nameThe name of the custom operator for which to add a configuration entry. Must match the name returned by the CustomOp's GetName() method.
config_keyThe name of the configuration entry.
config_valueThe value of the configuration entry.
Returns
A reference to this object to enable call chaining.

Definition at line 1044 of file onnxruntime_cxx_inline.h.

const std::unordered_map< std::string, std::string > & Ort::CustomOpConfigs::GetFlattenedConfigs ( ) const
inline

Returns a flattened map of custom operator configuration entries and their values.

The keys has been flattened to include both the custom operator name and the configuration entry key name. For example, a prior call to AddConfig("my_op", "key", "value") corresponds to the flattened key/value pair {"my_op.key", "value"}.

Returns
An unordered map of flattened configurations.

Definition at line 1050 of file onnxruntime_cxx_inline.h.

CustomOpConfigs& Ort::CustomOpConfigs::operator= ( const CustomOpConfigs )
default
CustomOpConfigs& Ort::CustomOpConfigs::operator= ( CustomOpConfigs &&  o)
default

The documentation for this struct was generated from the following files: