ArmNN
 21.02
DelegateOptions Class Reference

#include <DelegateOptions.hpp>

Public Member Functions

 DelegateOptions (armnn::Compute computeDevice, const std::vector< armnn::BackendOptions > &backendOptions={}, armnn::Optional< armnn::LogSeverity > logSeverityLevel=armnn::EmptyOptional())
 
 DelegateOptions (const std::vector< armnn::BackendId > &backends, const std::vector< armnn::BackendOptions > &backendOptions={}, armnn::Optional< armnn::LogSeverity > logSeverityLevel=armnn::EmptyOptional())
 
 DelegateOptions (armnn::Compute computeDevice, const armnn::OptimizerOptions &optimizerOptions, const armnn::Optional< armnn::LogSeverity > &logSeverityLevel=armnn::EmptyOptional(), const armnn::Optional< armnn::DebugCallbackFunction > &func=armnn::EmptyOptional())
 
 DelegateOptions (const std::vector< armnn::BackendId > &backends, const armnn::OptimizerOptions &optimizerOptions, const armnn::Optional< armnn::LogSeverity > &logSeverityLevel=armnn::EmptyOptional(), const armnn::Optional< armnn::DebugCallbackFunction > &func=armnn::EmptyOptional())
 
const std::vector< armnn::BackendId > & GetBackends () const
 
void SetBackends (const std::vector< armnn::BackendId > &backends)
 
const std::vector< armnn::BackendOptions > & GetBackendOptions () const
 
void AddBackendOption (const armnn::BackendOptions &option)
 Appends a backend option to the list of backend options. More...
 
void SetLoggingSeverity (const armnn::LogSeverity &level)
 Sets the severity level for logging within ArmNN that will be used on creation of the delegate. More...
 
void SetLoggingSeverity (const std::string &level)
 
armnn::LogSeverity GetLoggingSeverity ()
 Returns the severity level for logging within ArmNN. More...
 
bool IsLoggingEnabled ()
 
const armnn::OptimizerOptionsGetOptimizerOptions () const
 
void SetOptimizerOptions (const armnn::OptimizerOptions &optimizerOptions)
 
const armnn::Optional< armnn::DebugCallbackFunction > & GetDebugCallbackFunction () const
 

Detailed Description

Definition at line 19 of file DelegateOptions.hpp.

Constructor & Destructor Documentation

◆ DelegateOptions() [1/4]

DelegateOptions ( armnn::Compute  computeDevice,
const std::vector< armnn::BackendOptions > &  backendOptions = {},
armnn::Optional< armnn::LogSeverity logSeverityLevel = armnn::EmptyOptional() 
)

◆ DelegateOptions() [2/4]

DelegateOptions ( const std::vector< armnn::BackendId > &  backends,
const std::vector< armnn::BackendOptions > &  backendOptions = {},
armnn::Optional< armnn::LogSeverity logSeverityLevel = armnn::EmptyOptional() 
)

◆ DelegateOptions() [3/4]

DelegateOptions ( armnn::Compute  computeDevice,
const armnn::OptimizerOptions optimizerOptions,
const armnn::Optional< armnn::LogSeverity > &  logSeverityLevel = armnn::EmptyOptional(),
const armnn::Optional< armnn::DebugCallbackFunction > &  func = armnn::EmptyOptional() 
)

◆ DelegateOptions() [4/4]

DelegateOptions ( const std::vector< armnn::BackendId > &  backends,
const armnn::OptimizerOptions optimizerOptions,
const armnn::Optional< armnn::LogSeverity > &  logSeverityLevel = armnn::EmptyOptional(),
const armnn::Optional< armnn::DebugCallbackFunction > &  func = armnn::EmptyOptional() 
)

Member Function Documentation

◆ AddBackendOption()

void AddBackendOption ( const armnn::BackendOptions option)
inline

Appends a backend option to the list of backend options.

Definition at line 47 of file DelegateOptions.hpp.

Referenced by tflite::tflite_plugin_create_delegate().

47 { m_BackendOptions.push_back(option); }

◆ GetBackendOptions()

const std::vector<armnn::BackendOptions>& GetBackendOptions ( ) const
inline

Definition at line 44 of file DelegateOptions.hpp.

44 { return m_BackendOptions; }

◆ GetBackends()

const std::vector<armnn::BackendId>& GetBackends ( ) const
inline

Definition at line 40 of file DelegateOptions.hpp.

40 { return m_Backends; }

◆ GetDebugCallbackFunction()

const armnn::Optional<armnn::DebugCallbackFunction>& GetDebugCallbackFunction ( ) const
inline

Definition at line 62 of file DelegateOptions.hpp.

References armnn::CpuRef.

63  { return m_DebugCallbackFunc; }

◆ GetLoggingSeverity()

armnn::LogSeverity GetLoggingSeverity ( )
inline

Returns the severity level for logging within ArmNN.

Definition at line 54 of file DelegateOptions.hpp.

References OptionalReferenceSwitch< IsReference, T >::value().

54 { return m_LoggingSeverity.value(); }

◆ GetOptimizerOptions()

const armnn::OptimizerOptions& GetOptimizerOptions ( ) const
inline

Definition at line 58 of file DelegateOptions.hpp.

58 { return m_OptimizerOptions; }

◆ IsLoggingEnabled()

bool IsLoggingEnabled ( )
inline

Definition at line 56 of file DelegateOptions.hpp.

References OptionalBase::has_value().

56 { return m_LoggingSeverity.has_value(); }
bool has_value() const noexcept
Definition: Optional.hpp:53

◆ SetBackends()

void SetBackends ( const std::vector< armnn::BackendId > &  backends)
inline

Definition at line 42 of file DelegateOptions.hpp.

Referenced by tflite::tflite_plugin_create_delegate().

42 { m_Backends = backends; }

◆ SetLoggingSeverity() [1/2]

void SetLoggingSeverity ( const armnn::LogSeverity level)
inline

Sets the severity level for logging within ArmNN that will be used on creation of the delegate.

Definition at line 50 of file DelegateOptions.hpp.

Referenced by tflite::tflite_plugin_create_delegate().

50 { m_LoggingSeverity = level; }

◆ SetLoggingSeverity() [2/2]

void SetLoggingSeverity ( const std::string &  level)
inline

Definition at line 51 of file DelegateOptions.hpp.

References armnn::StringToLogLevel().

51 { m_LoggingSeverity = armnn::StringToLogLevel(level); }
LogSeverity StringToLogLevel(std::string level)
Definition: Logging.hpp:36

◆ SetOptimizerOptions()

void SetOptimizerOptions ( const armnn::OptimizerOptions optimizerOptions)
inline

Definition at line 60 of file DelegateOptions.hpp.

Referenced by tflite::tflite_plugin_create_delegate().

60 { m_OptimizerOptions = optimizerOptions; }

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