From 8d2ca734165a068478df7cffa46185680b05cd20 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 24 Feb 2023 10:28:19 +0000 Subject: Update Doxygen docu for 23.02 Signed-off-by: Nikhil Raj Change-Id: Ie6c19a27d50fefab2796b2b5875374e81f5bf971 --- 23.02/classarmnn_1_1_scoped_tensor_handle.xhtml | 421 ++++++++++++++++++++++++ 1 file changed, 421 insertions(+) create mode 100644 23.02/classarmnn_1_1_scoped_tensor_handle.xhtml (limited to '23.02/classarmnn_1_1_scoped_tensor_handle.xhtml') diff --git a/23.02/classarmnn_1_1_scoped_tensor_handle.xhtml b/23.02/classarmnn_1_1_scoped_tensor_handle.xhtml new file mode 100644 index 0000000000..8cd05428f5 --- /dev/null +++ b/23.02/classarmnn_1_1_scoped_tensor_handle.xhtml @@ -0,0 +1,421 @@ + + + + + + + + + + + + + +ArmNN: ScopedTensorHandle Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ScopedTensorHandle Class Reference
+
+
+ +

#include <TensorHandle.hpp>

+
+Inheritance diagram for ScopedTensorHandle:
+
+
+ + +TensorHandle +ConstTensorHandle +ITensorHandle + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ScopedTensorHandle (const TensorInfo &tensorInfo)
 
 ScopedTensorHandle (const ConstTensor &tensor)
 
 ScopedTensorHandle (const ConstTensorHandle &tensorHandle)
 
 ScopedTensorHandle (const ScopedTensorHandle &other)
 
ScopedTensorHandleoperator= (const ScopedTensorHandle &other)
 
 ~ScopedTensorHandle ()
 
virtual void Allocate () override
 Indicate to the memory manager that this resource is no longer active. More...
 
- Public Member Functions inherited from TensorHandle
template<typename T >
T * GetTensor () const
 
template<>
void * GetTensor () const
 
template<>
void * GetTensor () const
 
- Public Member Functions inherited from ConstTensorHandle
template<typename T >
const T * GetConstTensor () const
 
const TensorInfoGetTensorInfo () const
 
virtual void Manage () override
 Indicate to the memory manager that this resource is active. More...
 
virtual ITensorHandleGetParent () const override
 Get the parent tensor if this is a subtensor. More...
 
virtual const void * Map (bool) const override
 Map the tensor data for access. More...
 
virtual void Unmap () const override
 Unmap the tensor data. More...
 
TensorShape GetStrides () const override
 Get the strides for each dimension ordered from largest to smallest where the smallest value is the same as the size of a single element in the tensor. More...
 
TensorShape GetShape () const override
 Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension. More...
 
template<>
const void * GetConstTensor () const
 
template<>
const void * GetConstTensor () const
 
- Public Member Functions inherited from ITensorHandle
virtual ~ITensorHandle ()
 
void * Map (bool blocking=true)
 Map the tensor data for access. More...
 
void Unmap ()
 Unmap the tensor data that was previously mapped with call to Map(). More...
 
virtual unsigned int GetImportFlags () const
 Get flags describing supported import sources. More...
 
virtual bool Import (void *memory, MemorySource source)
 Import externally allocated memory. More...
 
virtual bool CanBeImported (void *memory, MemorySource source)
 Implementations must determine if this memory block can be imported. More...
 
virtual void Unimport ()
 Unimport externally allocated memory. More...
 
+ + + + + + + + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from TensorHandle
 TensorHandle (const TensorInfo &tensorInfo)
 
void SetMemory (void *mem)
 
- Protected Member Functions inherited from ConstTensorHandle
 ConstTensorHandle (const TensorInfo &tensorInfo)
 
void SetConstMemory (const void *mem)
 
+

Detailed Description

+
+

Definition at line 115 of file TensorHandle.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ScopedTensorHandle() [1/4]

+ +
+
+ + + + + +
+ + + + + + + + +
ScopedTensorHandle (const TensorInfotensorInfo)
+
+explicit
+
+ +

Definition at line 55 of file TensorHandle.cpp.

+
56 : TensorHandle(tensorInfo)
57 {
58 }
TensorHandle(const TensorInfo &tensorInfo)
+
+
+
+ +

◆ ScopedTensorHandle() [2/4]

+ +
+
+ + + + + +
+ + + + + + + + +
ScopedTensorHandle (const ConstTensortensor)
+
+explicit
+
+ +

Definition at line 60 of file TensorHandle.cpp.

+ +

References BaseTensor< MemoryType >::GetMemoryArea(), and BaseTensor< MemoryType >::GetNumBytes().

+
61 : ScopedTensorHandle(tensor.GetInfo())
62 {
63  CopyFrom(tensor.GetMemoryArea(), tensor.GetNumBytes());
64 }
ScopedTensorHandle(const TensorInfo &tensorInfo)
+
+
+
+ +

◆ ScopedTensorHandle() [3/4]

+ +
+
+ + + + + +
+ + + + + + + + +
ScopedTensorHandle (const ConstTensorHandletensorHandle)
+
+explicit
+
+ +

Definition at line 66 of file TensorHandle.cpp.

+ +

References ConstTensorHandle::GetConstTensor(), TensorInfo::GetNumBytes(), and ConstTensorHandle::GetTensorInfo().

+
67 : ScopedTensorHandle(tensorHandle.GetTensorInfo())
68 {
69  CopyFrom(tensorHandle.GetConstTensor<void>(), tensorHandle.GetTensorInfo().GetNumBytes());
70 }
ScopedTensorHandle(const TensorInfo &tensorInfo)
+
+
+
+ +

◆ ScopedTensorHandle() [4/4]

+ +
+
+ + + + + + + + +
ScopedTensorHandle (const ScopedTensorHandleother)
+
+ +

Definition at line 72 of file TensorHandle.cpp.

+
73 : TensorHandle(other.GetTensorInfo())
74 {
75  CopyFrom(other);
76 }
TensorHandle(const TensorInfo &tensorInfo)
+
+
+
+ +

◆ ~ScopedTensorHandle()

+ +
+
+ + + + + + + +
~ScopedTensorHandle ()
+
+ +

Definition at line 86 of file TensorHandle.cpp.

+
87 {
88  ::operator delete(GetTensor<void>());
89 }
+
+
+

Member Function Documentation

+ +

◆ Allocate()

+ +
+
+ + + + + +
+ + + + + + + +
void Allocate ()
+
+overridevirtual
+
+ +

Indicate to the memory manager that this resource is no longer active.

+

This is used to compute overlapping lifetimes of resources.

+ +

Implements ITensorHandle.

+ +

Definition at line 91 of file TensorHandle.cpp.

+ +

References ARMNN_ASSERT, TensorInfo::GetNumBytes(), TensorHandle::GetTensor(), ConstTensorHandle::GetTensorInfo(), and TensorHandle::SetMemory().

+
92 {
93  if (GetTensor<void>() == nullptr)
94  {
95  SetMemory(::operator new(GetTensorInfo().GetNumBytes()));
96  }
97  else
98  {
99  throw InvalidArgumentException("TensorHandle::Allocate Trying to allocate a TensorHandle"
100  "that already has allocated memory.");
101  }
102 }
void SetMemory(void *mem)
+
const TensorInfo & GetTensorInfo() const
+
+
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
ScopedTensorHandle & operator= (const ScopedTensorHandleother)
+
+ +

Definition at line 78 of file TensorHandle.cpp.

+ +

References TensorHandle::SetMemory().

+
79 {
80  ::operator delete(GetTensor<void>());
81  SetMemory(nullptr);
82  CopyFrom(other);
83  return *this;
84 }
void SetMemory(void *mem)
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1