From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/structarmnn_1_1_slice_queue_descriptor.xhtml | 206 +++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 20.02/structarmnn_1_1_slice_queue_descriptor.xhtml (limited to '20.02/structarmnn_1_1_slice_queue_descriptor.xhtml') diff --git a/20.02/structarmnn_1_1_slice_queue_descriptor.xhtml b/20.02/structarmnn_1_1_slice_queue_descriptor.xhtml new file mode 100644 index 0000000000..a58aa0f8f7 --- /dev/null +++ b/20.02/structarmnn_1_1_slice_queue_descriptor.xhtml @@ -0,0 +1,206 @@ + + + + + + + + + + + + + +ArmNN: SliceQueueDescriptor Struct Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SliceQueueDescriptor Struct Reference
+
+
+ +

#include <WorkloadData.hpp>

+
+Inheritance diagram for SliceQueueDescriptor:
+
+
+ + +QueueDescriptorWithParameters< SliceDescriptor > +QueueDescriptor + +
+ + + + + + + +

+Public Member Functions

void Validate (const WorkloadInfo &workloadInfo) const
 
- Public Member Functions inherited from QueueDescriptor
void ValidateInputsOutputs (const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from QueueDescriptorWithParameters< SliceDescriptor >
SliceDescriptor m_Parameters
 
- Public Attributes inherited from QueueDescriptor
std::vector< ITensorHandle * > m_Inputs
 
std::vector< ITensorHandle * > m_Outputs
 
- Protected Member Functions inherited from QueueDescriptorWithParameters< SliceDescriptor >
 ~QueueDescriptorWithParameters ()=default
 
 QueueDescriptorWithParameters ()=default
 
 QueueDescriptorWithParameters (QueueDescriptorWithParameters const &)=default
 
QueueDescriptorWithParametersoperator= (QueueDescriptorWithParameters const &)=default
 
- Protected Member Functions inherited from QueueDescriptor
 ~QueueDescriptor ()=default
 
 QueueDescriptor ()=default
 
 QueueDescriptor (QueueDescriptor const &)=default
 
QueueDescriptoroperator= (QueueDescriptor const &)=default
 
+

Detailed Description

+
+

Definition at line 554 of file WorkloadData.hpp.

+

Member Function Documentation

+ +

◆ Validate()

+ +
+
+ + + + + + + + +
void Validate (const WorkloadInfoworkloadInfo) const
+
+ +

Definition at line 2950 of file WorkloadData.cpp.

+ +

References TensorInfo::GetNumDimensions(), TensorInfo::GetShape(), WorkloadInfo::m_InputTensorInfos, and WorkloadInfo::m_OutputTensorInfos.

+
2951 {
2952  const std::string descriptorName{"SliceQueueDescriptor"};
2953 
2954  ValidateNumInputs(workloadInfo, descriptorName, 1);
2955  ValidateNumOutputs(workloadInfo, descriptorName, 1);
2956 
2957  const TensorInfo& inputTensorInfo = workloadInfo.m_InputTensorInfos[0];
2958  const TensorInfo& outputTensorInfo = workloadInfo.m_OutputTensorInfos[0];
2959 
2960  ValidateTensorDataTypesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
2961 
2962  const unsigned int rank = inputTensorInfo.GetNumDimensions();
2963  if (rank > 4)
2964  {
2965  throw InvalidArgumentException(descriptorName + ": Input tensors with rank greater than 4 are not supported.");
2966  }
2967 
2968  ValidateTensorNumDimensions(outputTensorInfo, descriptorName, rank, "output");
2969 
2970  // Check if m_Begin and m_Size have the expected length
2971  if (m_Parameters.m_Begin.size() != rank)
2972  {
2973  throw InvalidArgumentException(descriptorName +
2974  ": Length of begin offset descriptor must equal rank " + std::to_string(rank));
2975  }
2976  if (m_Parameters.m_Size.size() != rank)
2977  {
2978  throw InvalidArgumentException(descriptorName +
2979  ": Length of size descriptor must equal rank " + std::to_string(rank));
2980  }
2981 
2982  // Check if the shape of the output tensor matches m_Size
2983  const TensorShape& outputShape = outputTensorInfo.GetShape();
2984  for (unsigned int i = 0u; i < rank; ++i)
2985  {
2986  if (m_Parameters.m_Size[i] != outputShape[i])
2987  {
2988  throw InvalidArgumentException(descriptorName + ": Size descriptor does not match output tensor.");
2989  }
2990  }
2991 
2992  // Check if the sum of begin offset and size in a given dimension
2993  // does not exceed the size of corresponding input
2994  const TensorShape& inputShape = inputTensorInfo.GetShape();
2995  for(unsigned int i = 0u; i < rank; ++i)
2996  {
2997  if (m_Parameters.m_Begin[i] + m_Parameters.m_Size[i] > inputShape[i])
2998  {
2999  throw InvalidArgumentException(descriptorName + ": Sum of begin offset and size for dimension " +
3000  std::to_string(i) + " exceeds input size.");
3001  }
3002  }
3003 }
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
+ +
std::vector< unsigned int > m_Size
Size of the slice in each dimension.
+ + +
std::vector< TensorInfo > m_InputTensorInfos
+
std::vector< unsigned int > m_Begin
Beginning indices of the slice in each dimension.
+
std::vector< TensorInfo > m_OutputTensorInfos
+ +
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:92
+
+
+
+
The documentation for this struct was generated from the following files: +
+
+ + + + -- cgit v1.2.1