ArmNN
 24.02
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 75 of file BackendId.hpp.

Constructor & Destructor Documentation

◆ BackendId() [1/6]

BackendId ( )
inline

Definition at line 78 of file BackendId.hpp.

References armnn::Undefined.

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

References armnn::GetComputeDeviceAsCString().

Member Function Documentation

◆ Get()

const std::string& Get ( ) const
inline

Definition at line 138 of file BackendId.hpp.

138 { return m_Id; }

Referenced by ProfilerImpl::AnalyzeEventSequenceAndWriteResults(), armnn::AttemptBackendAssignment(), and GetBackendId().

◆ IsCpuAcc()

bool IsCpuAcc ( ) const
inline

Definition at line 135 of file BackendId.hpp.

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

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

◆ IsCpuRef()

bool IsCpuRef ( ) const
inline

Definition at line 134 of file BackendId.hpp.

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

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

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 140 of file BackendId.hpp.

140 { return m_Id.empty(); }

Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl().

◆ IsGpuAcc()

bool IsGpuAcc ( ) const
inline

Definition at line 136 of file BackendId.hpp.

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

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

◆ IsUndefined()

◆ 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= ( 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 102 of file BackendId.hpp.

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

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 94 of file BackendId.hpp.

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

◆ 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

comparison against objects from which the BackendId can be constructed

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:
armnn::Compute::Undefined
@ Undefined
armnn::Compute::GpuAcc
@ GpuAcc
GPU Execution: OpenCL: ArmCompute.
armnn::BackendId::BackendId
BackendId()
Definition: BackendId.hpp:78
armnn::Compute::CpuRef
@ CpuRef
CPU Execution: Reference C++ kernels.
armnn::swap
void swap(OriginsDescriptor &first, OriginsDescriptor &second)
Definition: Descriptors.cpp:356
armnn::Compute::CpuAcc
@ CpuAcc
CPU Execution: NEON: ArmCompute.
armnn::GetComputeDeviceAsCString
constexpr char const * GetComputeDeviceAsCString(Compute compute)
Deprecated function that will be removed together with the Compute enum.
Definition: BackendId.hpp:34