ArmNN  NotReleased
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)
 
 operator std::string () const
 
BackendIdoperator= (const std::string &other)
 
BackendIdoperator= (Compute compute)
 
bool operator== (const BackendId &other) const
 
template<typename O >
bool operator== (const O &other) const
 
template<typename O >
bool operator!= (const O &other) const
 
bool operator< (const BackendId &other) const
 
bool IsCpuRef () const
 
const std::string & Get () const
 
bool IsEmpty () const
 
bool IsUndefined () const
 

Detailed Description

Definition at line 75 of file BackendId.hpp.

Constructor & Destructor Documentation

◆ BackendId() [1/6]

BackendId ( )
inline

Definition at line 78 of file BackendId.hpp.

constexpr char const * GetComputeDeviceAsCString(Compute compute)
Definition: BackendId.hpp:34

◆ BackendId() [2/6]

BackendId ( const std::string &  id)
inline

Definition at line 79 of file BackendId.hpp.

79 : m_Id{id} {}

◆ BackendId() [3/6]

BackendId ( const char *  id)
inline

Definition at line 80 of file BackendId.hpp.

80 : m_Id{id} {}

◆ BackendId() [4/6]

BackendId ( const BackendId other)
default

◆ BackendId() [5/6]

BackendId ( BackendId &&  other)
default

◆ ~BackendId()

~BackendId ( )
inline

Definition at line 87 of file BackendId.hpp.

87 {}

◆ BackendId() [6/6]

BackendId ( Compute  compute)
inline

Deprecated function that will be removed together with the Compute enum

Definition at line 91 of file BackendId.hpp.

91 : m_Id{GetComputeDeviceAsCString(compute)} {}
constexpr char const * GetComputeDeviceAsCString(Compute compute)
Definition: BackendId.hpp:34

Member Function Documentation

◆ Get()

const std::string& Get ( ) const
inline

◆ IsCpuRef()

bool IsCpuRef ( ) const
inline

Definition at line 134 of file BackendId.hpp.

134 { return m_Id == GetComputeDeviceAsCString(Compute::CpuRef); }
CPU Execution: Reference C++ kernels.
constexpr char const * GetComputeDeviceAsCString(Compute compute)
Definition: BackendId.hpp:34

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 138 of file BackendId.hpp.

Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl().

138 { return m_Id.empty(); }

◆ IsUndefined()

bool IsUndefined ( ) const
inline

Definition at line 139 of file BackendId.hpp.

Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl().

constexpr char const * GetComputeDeviceAsCString(Compute compute)
Definition: BackendId.hpp:34

◆ operator std::string()

operator std::string ( ) const
inline

Definition at line 93 of file BackendId.hpp.

93 { return m_Id; }

◆ operator!=()

bool operator!= ( const O &  other) const
inline

Definition at line 124 of file BackendId.hpp.

125  {
126  return !(*this == other);
127  }

◆ operator<()

bool operator< ( const BackendId other) const
inline

Definition at line 129 of file BackendId.hpp.

130  {
131  return m_Id < other.m_Id;
132  }

◆ operator=() [1/4]

BackendId& operator= ( const BackendId other)
default

◆ operator=() [2/4]

BackendId& operator= ( BackendId &&  other)
default

◆ operator=() [3/4]

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

Definition at line 94 of file BackendId.hpp.

95  {
96  m_Id = other;
97  return *this;
98  }

◆ operator=() [4/4]

BackendId& operator= ( Compute  compute)
inline

Deprecated function that will be removed together with the Compute enum

Definition at line 102 of file BackendId.hpp.

References armnn::swap().

103  {
104  BackendId temp{compute};
105  std::swap(temp.m_Id, m_Id);
106  return *this;
107  }
void swap(OriginsDescriptor &first, OriginsDescriptor &second)

◆ operator==() [1/2]

bool operator== ( const BackendId other) const
inline

Definition at line 109 of file BackendId.hpp.

110  {
111  return m_Id == other.m_Id;
112  }

◆ operator==() [2/2]

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

Definition at line 117 of file BackendId.hpp.

118  {
119  BackendId temp{other};
120  return *this == temp;
121  }

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