diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2018-12-06 12:03:17 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2018-12-07 16:25:45 +0000 |
commit | f9afc791662f9ffd639a9500de8c4e33394c8c39 (patch) | |
tree | 26b3203c189f0a0f280e8fab4fd081f2d6112da3 /src/armnn | |
parent | ba563c6d81bfb20f01b1b54e27fe1ac4a494ece1 (diff) | |
download | armnn-f9afc791662f9ffd639a9500de8c4e33394c8c39.tar.gz |
IVGCVSW-2268 Remove the input swizzling from ParseConcat
* Removed the input swizzling when the concatenation dimension is 3
in ParseConcat in the TF parser
* No longer using the helper ProcessConcatInputTensorInfo, where
the input was being swizzled if the concatenation dimension was 3
* Added a new convenience constuctor to TensorShape that initializes
a shape to all zeros given only the number of dimensions
Change-Id: I82a207e41bddc5fea21a0b5a38eafa24ad75d1c2
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/Tensor.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/armnn/Tensor.cpp b/src/armnn/Tensor.cpp index 8e72d4694c..6e09e3bc59 100644 --- a/src/armnn/Tensor.cpp +++ b/src/armnn/Tensor.cpp @@ -23,6 +23,22 @@ TensorShape::TensorShape() { } +TensorShape::TensorShape(unsigned int numDimensions) + : m_NumDimensions(numDimensions) +{ + if (numDimensions < 1) + { + throw InvalidArgumentException("Tensor numDimensions must be greater than 0"); + } + + if (numDimensions > MaxNumOfTensorDimensions) + { + throw InvalidArgumentException("Tensor numDimensions must be less than or equal to MaxNumOfTensorDimensions"); + } + + std::fill(m_Dimensions.begin(), m_Dimensions.begin() + m_NumDimensions, 0); +} + TensorShape::TensorShape(const unsigned int numDimensions, const unsigned int* const dimensionSizes) : m_NumDimensions(numDimensions) { |