ArmNN
 22.02
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 187 of file TensorHandle.hpp.

Constructor & Destructor Documentation

◆ ManagedConstTensorHandle() [1/2]

ManagedConstTensorHandle ( std::shared_ptr< ConstTensorHandle ptr)
inlineexplicit

Definition at line 191 of file TensorHandle.hpp.

192  : m_Mapped(false)
193  , m_TensorHandle(std::move(ptr)) {};

◆ ManagedConstTensorHandle() [2/2]

ManagedConstTensorHandle ( const ConstTensorHandle other)
delete

◆ ~ManagedConstTensorHandle()

Definition at line 220 of file TensorHandle.hpp.

221  {
222  // Bias tensor handles need to be initialized empty before entering scope of if statement checking if enabled
223  if (m_TensorHandle)
224  {
225  Unmap();
226  }
227  }

Member Function Documentation

◆ GetTensorInfo()

◆ IsMapped()

bool IsMapped ( ) const
inline

Definition at line 244 of file TensorHandle.hpp.

245  {
246  return m_Mapped;
247  }

◆ 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 229 of file TensorHandle.hpp.

230  {
231  // Only unmap if mapped and TensorHandle exists.
232  if (m_Mapped && m_TensorHandle)
233  {
234  m_TensorHandle->Unmap();
235  m_Mapped = false;
236  }
237  }

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