ArmNN
 25.11
Loading...
Searching...
No Matches
BackendId Class Referencefinal

#include <BackendId.hpp>

Public Member Functions

 BackendId ()
 BackendId (const std::string &id)
 BackendId (const char *id)
 BackendId (const BackendId &other)=default
 BackendId (BackendId &&other)=default
BackendIdoperator= (const BackendId &other)=default
BackendIdoperator= (BackendId &&other)=default
 ~BackendId ()
 BackendId (Compute compute)
 Deprecated function that will be removed together with the Compute enum.
 operator std::string () const
BackendIdoperator= (const std::string &other)
BackendIdoperator= (Compute compute)
 Deprecated function that will be removed together with the Compute enum.
bool operator== (const BackendId &other) const
template<typename O>
bool operator== (const O &other) const
 comparison against objects from which the BackendId can be constructed
template<typename O>
bool operator!= (const O &other) const
bool operator< (const BackendId &other) const
bool IsCpuRef () const
bool IsCpuAcc () const
bool IsGpuAcc () const
const std::string & Get () const
bool IsEmpty () const
bool IsUndefined () const

Detailed Description

Definition at line 78 of file BackendId.hpp.

Constructor & Destructor Documentation

◆ BackendId() [1/6]

BackendId ( )
inline

Definition at line 81 of file BackendId.hpp.

81: m_Id(GetComputeDeviceAsCString(Compute::Undefined)) {}
constexpr char const * GetComputeDeviceAsCString(Compute compute)
Deprecated function that will be removed together with the Compute enum.
Definition BackendId.hpp:36

References armnn::GetComputeDeviceAsCString(), and armnn::Undefined.

Referenced by BackendId(), BackendId(), operator<(), operator=(), operator=(), operator=(), operator=(), operator==(), and operator==().

◆ BackendId() [2/6]

BackendId ( const std::string & id)
inline

Definition at line 82 of file BackendId.hpp.

82: m_Id{id} {}

◆ BackendId() [3/6]

BackendId ( const char * id)
inline

Definition at line 83 of file BackendId.hpp.

83: m_Id{id} {}

◆ BackendId() [4/6]

BackendId ( const BackendId & other)
default

References BackendId().

◆ BackendId() [5/6]

BackendId ( BackendId && other)
default

References BackendId().

◆ ~BackendId()

~BackendId ( )
inline

Definition at line 90 of file BackendId.hpp.

90{}

◆ BackendId() [6/6]

BackendId ( Compute compute)
inline

Deprecated function that will be removed together with the Compute enum.

Definition at line 94 of file BackendId.hpp.

94: m_Id{GetComputeDeviceAsCString(compute)} {}

References armnn::GetComputeDeviceAsCString().

Member Function Documentation

◆ Get()

const std::string & Get ( ) const
inline

◆ IsCpuAcc()

bool IsCpuAcc ( ) const
inline

Definition at line 138 of file BackendId.hpp.

138{ return m_Id == GetComputeDeviceAsCString(Compute::CpuAcc); }

References armnn::CpuAcc, and armnn::GetComputeDeviceAsCString().

◆ IsCpuRef()

bool IsCpuRef ( ) const
inline

Definition at line 137 of file BackendId.hpp.

137{ return m_Id == GetComputeDeviceAsCString(Compute::CpuRef); }

References armnn::CpuRef, and armnn::GetComputeDeviceAsCString().

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 143 of file BackendId.hpp.

143{ return m_Id.empty(); }

Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl().

◆ IsGpuAcc()

bool IsGpuAcc ( ) const
inline

Definition at line 139 of file BackendId.hpp.

139{ return m_Id == GetComputeDeviceAsCString(Compute::GpuAcc); }

References armnn::GetComputeDeviceAsCString(), and armnn::GpuAcc.

◆ IsUndefined()

bool IsUndefined ( ) const
inline

Definition at line 144 of file BackendId.hpp.

144{ return m_Id == GetComputeDeviceAsCString(Compute::Undefined); }

References armnn::GetComputeDeviceAsCString(), and armnn::Undefined.

Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl().

◆ operator std::string()

operator std::string ( ) const
inline

Definition at line 96 of file BackendId.hpp.

96{ return m_Id; }

◆ operator!=()

template<typename O>
bool operator!= ( const O & other) const
inline

Definition at line 127 of file BackendId.hpp.

128 {
129 return !(*this == other);
130 }

◆ operator<()

bool operator< ( const BackendId & other) const
inline

Definition at line 132 of file BackendId.hpp.

133 {
134 return m_Id < other.m_Id;
135 }

References BackendId().

◆ operator=() [1/4]

BackendId & operator= ( BackendId && other)
default

References BackendId().

◆ operator=() [2/4]

BackendId & operator= ( Compute compute)
inline

Deprecated function that will be removed together with the Compute enum.

Definition at line 105 of file BackendId.hpp.

106 {
107 BackendId temp{compute};
108 std::swap(temp.m_Id, m_Id);
109 return *this;
110 }

References BackendId().

◆ operator=() [3/4]

BackendId & operator= ( const BackendId & other)
default

References BackendId().

◆ operator=() [4/4]

BackendId & operator= ( const std::string & other)
inline

Definition at line 97 of file BackendId.hpp.

98 {
99 m_Id = other;
100 return *this;
101 }

References BackendId().

◆ operator==() [1/2]

bool operator== ( const BackendId & other) const
inline

Definition at line 112 of file BackendId.hpp.

113 {
114 return m_Id == other.m_Id;
115 }

References BackendId().

◆ operator==() [2/2]

template<typename O>
bool operator== ( const O & other) const
inline

comparison against objects from which the BackendId can be constructed

Definition at line 120 of file BackendId.hpp.

121 {
122 BackendId temp{other};
123 return *this == temp;
124 }

References BackendId().


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