aboutsummaryrefslogtreecommitdiff
path: root/src/backends/aclCommon/ArmComputeTensorUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/aclCommon/ArmComputeTensorUtils.hpp')
-rw-r--r--src/backends/aclCommon/ArmComputeTensorUtils.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backends/aclCommon/ArmComputeTensorUtils.hpp b/src/backends/aclCommon/ArmComputeTensorUtils.hpp
index 1f07fa949c..0c2ff878e1 100644
--- a/src/backends/aclCommon/ArmComputeTensorUtils.hpp
+++ b/src/backends/aclCommon/ArmComputeTensorUtils.hpp
@@ -108,7 +108,7 @@ unsigned int ComputeDepthwiseConv2dDepthMultiplier(armnn::DataLayout layout,
const arm_compute::TensorShape& weightsShape,
const arm_compute::TensorShape& inputShape);
-/// Utility function used to setup an arm_compute::PadStrideInfo object from an armnn layer descriptor.
+/// Utility function used to setup an arm_compute::PadStrideInfo object from an ArmNN layer descriptor.
template <typename Descriptor>
arm_compute::PadStrideInfo BuildArmComputePadStrideInfo(const Descriptor &descriptor)
{
@@ -121,6 +121,14 @@ arm_compute::PadStrideInfo BuildArmComputePadStrideInfo(const Descriptor &descri
arm_compute::DimensionRoundingType::FLOOR);
}
+/// Utility function used to setup an arm_compute::CropInfo object from an ArmNN layer descriptor.
+template <typename Descriptor>
+arm_compute::CropInfo BuildArmComputeCropInfo(const Descriptor& descriptor)
+{
+ return arm_compute::CropInfo(descriptor.m_Crops[1].first, descriptor.m_Crops[1].second,
+ descriptor.m_Crops[0].first, descriptor.m_Crops[0].second);
+}
+
/// Sets up the given ArmCompute tensor's dimensions based on the given ArmNN tensor.
template <typename Tensor>
void BuildArmComputeTensor(Tensor& tensor, const armnn::TensorInfo& tensorInfo)