diff options
Diffstat (limited to 'src/armnnUtils/TensorUtils.hpp')
-rw-r--r-- | src/armnnUtils/TensorUtils.hpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/armnnUtils/TensorUtils.hpp b/src/armnnUtils/TensorUtils.hpp index 6461b37f75..fb5e6eb10d 100644 --- a/src/armnnUtils/TensorUtils.hpp +++ b/src/armnnUtils/TensorUtils.hpp @@ -15,23 +15,11 @@ armnn::TensorShape GetTensorShape(unsigned int numberOfBatches, unsigned int width, const armnn::DataLayout dataLayout); -template<typename T> armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, - const armnn::DataLayout dataLayout) -{ - switch (dataLayout) - { - case armnn::DataLayout::NCHW: - return armnn::TensorInfo({numberOfBatches, numberOfChannels, height, width}, armnn::GetDataType<T>()); - case armnn::DataLayout::NHWC: - return armnn::TensorInfo({numberOfBatches, height, width, numberOfChannels}, armnn::GetDataType<T>()); - default: - throw armnn::InvalidArgumentException("Unknown data layout [" - + std::to_string(static_cast<int>(dataLayout)) + - "]", CHECK_LOCATION()); - } -} -} // namespace armnnUtils
\ No newline at end of file + const armnn::DataLayout dataLayout, + const armnn::DataType dataType); + +} // namespace armnnUtils |