aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-01-04 18:01:21 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-01-07 11:25:42 +0000
commitd5b9e6497b03d58c671c15b9ebe8e35500171f06 (patch)
treebf1e995d1b88f75cf497e8fd5f52f5003272187e /src/armnnUtils
parent2ad6cb486164ff3aabe4e9ecabc47f08da48da35 (diff)
downloadarmnn-d5b9e6497b03d58c671c15b9ebe8e35500171f06.tar.gz
IVGCVSW-2421 Remove the template-based version of armnnUtils::Permute
in favor of a type-indepent implementation that takes void-pointers * The new implementation requires the size of the type to be passed to the function * Updated all the usages accordingly * Removed the old implementation no longer used !android-nn-driver:469 Change-Id: I37f4e6d62a38fbb8ec8c39bb559a2c54c83365d4
Diffstat (limited to 'src/armnnUtils')
-rw-r--r--src/armnnUtils/Permute.cpp52
-rw-r--r--src/armnnUtils/Permute.hpp3
2 files changed, 0 insertions, 55 deletions
diff --git a/src/armnnUtils/Permute.cpp b/src/armnnUtils/Permute.cpp
index 6deff90168..24a8286bba 100644
--- a/src/armnnUtils/Permute.cpp
+++ b/src/armnnUtils/Permute.cpp
@@ -39,14 +39,6 @@ public:
}
}
- template <typename T>
- void Unroll(const T* srcData, T* dstData)
- {
- const T* const srcEnd = srcData + m_DstShape.GetNumElements();
- T* const dstEnd = dstData + m_DstShape.GetNumElements();
- Unroll(0, srcData, dstData, srcEnd, dstEnd);
- }
-
void Unroll(const void* srcData, void* dstData, size_t dataTypeSize)
{
assert(srcData);
@@ -63,32 +55,6 @@ public:
}
private:
- template <typename T>
- void Unroll(size_type dimension, const T* srcData, T* dstData, const T* srcEnd, T* dstEnd)
- {
- assert(srcData);
- assert(dstData);
- assert(srcEnd);
- assert(dstEnd);
- assert(srcData < srcEnd);
- assert(dstData < dstEnd);
-
- if (dimension >= m_DstShape.GetNumDimensions())
- {
- *dstData = *srcData;
- }
- else
- {
- for (size_type i = 0; i < m_DstShape[dimension]; i++)
- {
- Unroll(dimension + 1, srcData, dstData, srcEnd, dstEnd);
-
- srcData += m_SrcStrides[dimension];
- dstData += m_DstStrides[dimension];
- }
- }
- }
-
void Unroll(size_type dimension,
const unsigned char* srcData, unsigned char* dstData,
const unsigned char* srcEnd, unsigned char* dstEnd,
@@ -157,22 +123,4 @@ void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector&
PermuteLoop(dstShape, mappings).Unroll(src, dst, dataTypeSize);
}
-template <typename T>
-void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings, const T* src, T* dst)
-{
- PermuteLoop(dstShape, mappings).Unroll(src, dst);
-}
-
-// Instantiates for types.
-template void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
- const armnn::Half* src, armnn::Half* dst);
-template void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
- const float* src, float* dst);
-template void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
- const uint8_t* src, uint8_t* dst);
-template void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
- const int32_t* src, int32_t* dst);
-template void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
- const bool* src, bool* dst);
-
} // namespace armnnUtils
diff --git a/src/armnnUtils/Permute.hpp b/src/armnnUtils/Permute.hpp
index 4e4319822b..b9ef94bc86 100644
--- a/src/armnnUtils/Permute.hpp
+++ b/src/armnnUtils/Permute.hpp
@@ -17,7 +17,4 @@ armnn::TensorInfo Permuted(const armnn::TensorInfo& info, const armnn::Permutati
void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings,
const void* src, void* dst, size_t dataTypeSize);
-template <typename T>
-void Permute(const armnn::TensorShape& dstShape, const armnn::PermutationVector& mappings, const T* src, T* dst);
-
} // namespace armnnUtils