aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/Pooling2dLayer.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2018-11-19 13:19:28 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2018-11-19 16:14:07 +0000
commit8800c00770ed14eb48045cfcf033d6b67595a126 (patch)
tree3bdbd3a97bfc21276a98a14aeae3e878c96c3121 /src/armnn/layers/Pooling2dLayer.cpp
parent5cdda351b4e12c5299173ec6b0fc75a948bdcda0 (diff)
downloadarmnn-8800c00770ed14eb48045cfcf033d6b67595a126.tar.gz
IVGCVSW-2169 Remove DataLayoutIndexed from public API
Change-Id: If8d8087d9d365e467d3ca9bf9c40d7219cb75cfd
Diffstat (limited to 'src/armnn/layers/Pooling2dLayer.cpp')
-rw-r--r--src/armnn/layers/Pooling2dLayer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/armnn/layers/Pooling2dLayer.cpp b/src/armnn/layers/Pooling2dLayer.cpp
index 821c011cd0..24b7a69c49 100644
--- a/src/armnn/layers/Pooling2dLayer.cpp
+++ b/src/armnn/layers/Pooling2dLayer.cpp
@@ -7,6 +7,7 @@
#include "LayerCloneBase.hpp"
#include <armnn/TypesUtils.hpp>
+#include <backendsCommon/DataLayoutIndexed.hpp>
#include <backendsCommon/WorkloadData.hpp>
#include <backendsCommon/WorkloadFactory.hpp>
@@ -33,13 +34,14 @@ std::vector<TensorShape> Pooling2dLayer::InferOutputShapes(const std::vector<Ten
{
BOOST_ASSERT(inputShapes.size() == 1);
const TensorShape& inputShape = inputShapes[0];
+ const DataLayoutIndexed dimensionIndices = m_Param.m_DataLayout;
// If we support multiple batch dimensions in the future, then this assert will need to change.
BOOST_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Pooling2dLayer will always have 4D input.");
- unsigned int inWidth = inputShape[m_Param.m_DataLayout.GetWidthIndex()];
- unsigned int inHeight = inputShape[m_Param.m_DataLayout.GetHeightIndex()];
- unsigned int inChannels = inputShape[m_Param.m_DataLayout.GetChannelsIndex()];
+ unsigned int inWidth = inputShape[dimensionIndices.GetWidthIndex()];
+ unsigned int inHeight = inputShape[dimensionIndices.GetHeightIndex()];
+ unsigned int inChannels = inputShape[dimensionIndices.GetChannelsIndex()];
unsigned int inBatchSize = inputShape[0];
bool isGlobalPooling = (m_Param.m_StrideX==0 && m_Param.m_StrideY==0);