From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml | 563 +++++++++++++++++++++ 1 file changed, 563 insertions(+) create mode 100644 21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml (limited to '21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml') diff --git a/21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml b/21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml new file mode 100644 index 0000000000..e184234025 --- /dev/null +++ b/21.02/classarmnn_1_1_const_cpu_tensor_handle.xhtml @@ -0,0 +1,563 @@ + + + + + + + + + + + + + +ArmNN: ConstCpuTensorHandle Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ConstCpuTensorHandle Class Reference
+
+
+ +

#include <CpuTensorHandle.hpp>

+
+Inheritance diagram for ConstCpuTensorHandle:
+
+
+ + +ITensorHandle +ConstPassthroughCpuTensorHandle +CpuTensorHandle +PassthroughCpuTensorHandle +ScopedCpuTensorHandle + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

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 ()
 
virtual void Allocate ()=0
 Indicate to the memory manager that this resource is no longer active. More...
 
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...
 
+ + + + + +

+Protected Member Functions

 ConstCpuTensorHandle (const TensorInfo &tensorInfo)
 
void SetConstMemory (const void *mem)
 
+

Detailed Description

+
+

Definition at line 27 of file CpuTensorHandle.hpp.

+

Constructor & Destructor Documentation

+ +

◆ ConstCpuTensorHandle()

+ +
+
+ + + + + +
+ + + + + + + + +
ConstCpuTensorHandle (const TensorInfotensorInfo)
+
+protected
+
+ +

Definition at line 31 of file CpuTensorHandle.cpp.

+ +

Referenced by ConstCpuTensorHandle::GetShape(), and ConstCpuTensorHandle::SetConstMemory().

+
32 : m_TensorInfo(tensorInfo)
33 , m_Memory(nullptr)
34 {
35 }
+
+
+

Member Function Documentation

+ +

◆ GetConstTensor() [1/3]

+ +
+
+ + + + + +
+ + + + + + + +
const T* GetConstTensor () const
+
+inline
+
+ +

Definition at line 31 of file CpuTensorHandle.hpp.

+ +

References ARMNN_ASSERT, and ConstCpuTensorHandle::GetTensorInfo().

+ +

Referenced by ConstPassthroughCpuTensorHandle::ConstPassthroughCpuTensorHandle(), ClConstantWorkload::Execute(), armnn::InitializeArmComputeTensorData(), armnn::PermuteTensor(), RefConstantWorkload::PostAllocationConfigure(), and ScopedCpuTensorHandle::ScopedCpuTensorHandle().

+
32  {
33  ARMNN_ASSERT(CompatibleTypes<T>(GetTensorInfo().GetDataType()));
34  return reinterpret_cast<const T*>(m_Memory);
35  }
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
const TensorInfo & GetTensorInfo() const
+
+
+
+ +

◆ GetConstTensor() [2/3]

+ +
+
+ + + + + + + +
const void * GetConstTensor () const
+
+ +

Definition at line 38 of file CpuTensorHandle.cpp.

+
39 {
40  return m_Memory;
41 }
+
+
+ +

◆ GetConstTensor() [3/3]

+ +
+
+ + + + + + + +
const void* GetConstTensor () const
+
+ +
+
+ +

◆ GetParent()

+ +
+
+ + + + + +
+ + + + + + + +
virtual ITensorHandle* GetParent () const
+
+inlineoverridevirtual
+
+ +

Get the parent tensor if this is a subtensor.

+
Returns
a pointer to the parent tensor. Otherwise nullptr if not a subtensor.
+ +

Implements ITensorHandle.

+ +

Definition at line 44 of file CpuTensorHandle.hpp.

+
44 { return nullptr; }
+
+
+ +

◆ GetShape()

+ +
+
+ + + + + +
+ + + + + + + +
TensorShape GetShape () const
+
+inlineoverridevirtual
+
+ +

Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension.

+
Returns
a TensorShape filled with the number of elements for each dimension.
+ +

Implements ITensorHandle.

+ +

Definition at line 53 of file CpuTensorHandle.hpp.

+ +

References ConstCpuTensorHandle::ConstCpuTensorHandle(), and TensorInfo::GetShape().

+
53 { return m_TensorInfo.GetShape(); }
const TensorShape & GetShape() const
Definition: Tensor.hpp:187
+
+
+
+ +

◆ GetStrides()

+ +
+
+ + + + + +
+ + + + + + + +
TensorShape GetStrides () const
+
+inlineoverridevirtual
+
+ +

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.

+
Returns
a TensorShape filled with the strides for each dimension
+ +

Implements ITensorHandle.

+ +

Definition at line 49 of file CpuTensorHandle.hpp.

+ +

References armnn::GetUnpaddedTensorStrides().

+
50  {
51  return GetUnpaddedTensorStrides(m_TensorInfo);
52  }
TensorShape GetUnpaddedTensorStrides(const TensorInfo &tensorInfo)
+
+
+
+ +

◆ GetTensorInfo()

+ + + +

◆ Manage()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void Manage ()
+
+inlineoverridevirtual
+
+ +

Indicate to the memory manager that this resource is active.

+

This is used to compute overlapping lifetimes of resources.

+ +

Implements ITensorHandle.

+ +

Definition at line 42 of file CpuTensorHandle.hpp.

+
42 {}
+
+
+ +

◆ Map()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual const void* Map (bool blocking) const
+
+inlineoverridevirtual
+
+ +

Map the tensor data for access.

+
Parameters
+ + +
blockinghint to block the calling thread until all other accesses are complete. (backend dependent)
+
+
+
Returns
pointer to the first element of the mapped data.
+ +

Implements ITensorHandle.

+ +

Definition at line 46 of file CpuTensorHandle.hpp.

+
46 { return m_Memory; }
+
+
+ +

◆ SetConstMemory()

+ +
+
+ + + + + +
+ + + + + + + + +
void SetConstMemory (const void * mem)
+
+inlineprotected
+
+
+ +

◆ Unmap()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void Unmap () const
+
+inlineoverridevirtual
+
+ +

Unmap the tensor data.

+ +

Implements ITensorHandle.

+ +

Definition at line 47 of file CpuTensorHandle.hpp.

+
47 {}
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1