ArmNN
 21.08
ManagedConstTensorHandle Class Reference

#include <TensorHandle.hpp>

Public Member Functions

 ManagedConstTensorHandle (std::shared_ptr< ConstTensorHandle > ptr)
 
const void * Map (bool blocking=true)
 RAII Managed resource Unmaps MemoryArea once out of scope. More...
 
 ManagedConstTensorHandle (const ConstTensorHandle &other)=delete
 
ManagedConstTensorHandleoperator= (const ManagedConstTensorHandle &other)=delete
 
ManagedConstTensorHandleoperator= (ManagedConstTensorHandle &&other) noexcept=delete
 
 ~ManagedConstTensorHandle ()
 
void Unmap ()
 
const TensorInfoGetTensorInfo () const
 
bool IsMapped () const
 

Detailed Description

Definition at line 178 of file TensorHandle.hpp.

Constructor & Destructor Documentation

◆ ManagedConstTensorHandle() [1/2]

ManagedConstTensorHandle ( std::shared_ptr< ConstTensorHandle ptr)
inlineexplicit

Definition at line 182 of file TensorHandle.hpp.

183  : m_Mapped(false)
184  , m_TensorHandle(std::move(ptr)) {};

◆ ManagedConstTensorHandle() [2/2]

ManagedConstTensorHandle ( const ConstTensorHandle other)
delete

◆ ~ManagedConstTensorHandle()

Definition at line 211 of file TensorHandle.hpp.

212  {
213  // Bias tensor handles need to be initialized empty before entering scope of if statement checking if enabled
214  if (m_TensorHandle)
215  {
216  Unmap();
217  }
218  }

Member Function Documentation

◆ GetTensorInfo()

◆ IsMapped()

bool IsMapped ( ) const
inline

Definition at line 235 of file TensorHandle.hpp.

236  {
237  return m_Mapped;
238  }

◆ Map()

const void* Map ( bool  blocking = true)
inline

◆ operator=() [1/2]

ManagedConstTensorHandle& operator= ( const ManagedConstTensorHandle other)
delete

◆ operator=() [2/2]

ManagedConstTensorHandle& operator= ( ManagedConstTensorHandle &&  other)
deletenoexcept

◆ Unmap()

void Unmap ( )
inline

Definition at line 220 of file TensorHandle.hpp.

221  {
222  // Only unmap if mapped and TensorHandle exists.
223  if (m_Mapped && m_TensorHandle)
224  {
225  m_TensorHandle->Unmap();
226  m_Mapped = false;
227  }
228  }

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