ArmNN
 24.02
DeviceSpec Class Reference

#include <DeviceSpec.hpp>

Inheritance diagram for DeviceSpec:
[legend]
Collaboration diagram for DeviceSpec:
[legend]

Public Member Functions

 DeviceSpec ()
 
 DeviceSpec (const BackendIdSet &supportedBackends)
 
virtual ~DeviceSpec ()
 
virtual const BackendIdSetGetSupportedBackends () const override
 
void AddSupportedBackends (const BackendIdSet &backendIds, bool isDynamic=false)
 
void ClearDynamicBackends ()
 
const BackendIdSetGetDynamicBackends () const
 

Additional Inherited Members

- Protected Member Functions inherited from IDeviceSpec
 IDeviceSpec ()
 
virtual ~IDeviceSpec ()
 

Detailed Description

Definition at line 14 of file DeviceSpec.hpp.

Constructor & Destructor Documentation

◆ DeviceSpec() [1/2]

DeviceSpec ( )
inline

Definition at line 17 of file DeviceSpec.hpp.

18  {}

◆ DeviceSpec() [2/2]

DeviceSpec ( const BackendIdSet supportedBackends)
inline

Definition at line 20 of file DeviceSpec.hpp.

21  : m_SupportedBackends{supportedBackends} {}

◆ ~DeviceSpec()

virtual ~DeviceSpec ( )
inlinevirtual

Definition at line 23 of file DeviceSpec.hpp.

23 {}

Member Function Documentation

◆ AddSupportedBackends()

void AddSupportedBackends ( const BackendIdSet backendIds,
bool  isDynamic = false 
)
inline

Definition at line 30 of file DeviceSpec.hpp.

31  {
32  m_SupportedBackends.insert(backendIds.begin(), backendIds.end());
33  if (isDynamic)
34  {
35  m_DynamicBackends.insert(backendIds.begin(), backendIds.end());
36  }
37  }

◆ ClearDynamicBackends()

void ClearDynamicBackends ( )
inline

Definition at line 39 of file DeviceSpec.hpp.

40  {
41  for (const auto& id : m_DynamicBackends)
42  {
43  m_SupportedBackends.erase(id);
44  }
45  m_DynamicBackends.clear();
46  }

Referenced by RuntimeImpl::RuntimeImpl(), and RuntimeImpl::~RuntimeImpl().

◆ GetDynamicBackends()

const BackendIdSet& GetDynamicBackends ( ) const
inline

Definition at line 48 of file DeviceSpec.hpp.

49  {
50  return m_DynamicBackends;
51  }

Referenced by RuntimeImpl::RuntimeImpl(), and RuntimeImpl::~RuntimeImpl().

◆ GetSupportedBackends()

virtual const BackendIdSet& GetSupportedBackends ( ) const
inlineoverridevirtual

Implements IDeviceSpec.

Definition at line 25 of file DeviceSpec.hpp.

26  {
27  return m_SupportedBackends;
28  }

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