ArmNN
 26.07
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. More...
 
 operator std::string () const
 
BackendIdoperator= (const std::string &other)
 
BackendIdoperator= (Compute compute)
 Deprecated function that will be removed together with the Compute enum. More...
 
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 More...
 
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.

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

References armnn::Undefined.

◆ 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

◆ BackendId() [5/6]

BackendId ( BackendId &&  other)
default

◆ ~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)} {}

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); }
@ CpuAcc
CPU Execution: NEON: ArmCompute.

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); }
@ CpuRef
CPU Execution: Reference C++ kernels.

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); }
@ GpuAcc
GPU Execution: OpenCL: ArmCompute.

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

◆ IsUndefined()

◆ operator std::string()

operator std::string ( ) const
inline

Definition at line 96 of file BackendId.hpp.

96 { return m_Id; }

◆ operator!=()

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  }

◆ operator=() [1/4]

BackendId& operator= ( BackendId &&  other)
default

◆ 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  }
void swap(OriginsDescriptor &first, OriginsDescriptor &second)

References armnn::swap().

◆ operator=() [3/4]

BackendId& operator= ( const BackendId other)
default

◆ 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  }

◆ 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  }

◆ operator==() [2/2]

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  }

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