diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2018-11-01 16:15:57 +0000 |
---|---|---|
committer | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2018-11-02 14:49:21 +0000 |
commit | c9cc80455ff29fd2c8622c9487ec9c57ade6ea30 (patch) | |
tree | 41b1491312fe6082b39d5d37ffa0dcf0ab0f2817 /src/backends/MakeWorkloadHelper.hpp | |
parent | 207ef9a6b8b3ea0afe9a095639f67b5dedd095d7 (diff) | |
download | armnn-c9cc80455ff29fd2c8622c9487ec9c57ade6ea30.tar.gz |
IVGCVSW-1946: Remove armnn/src from the include paths
Change-Id: I663a0a0fccb43ee960ec070121a59df9db0bb04e
Diffstat (limited to 'src/backends/MakeWorkloadHelper.hpp')
-rw-r--r-- | src/backends/MakeWorkloadHelper.hpp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/backends/MakeWorkloadHelper.hpp b/src/backends/MakeWorkloadHelper.hpp deleted file mode 100644 index 78a9669530..0000000000 --- a/src/backends/MakeWorkloadHelper.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// -#pragma once - -namespace armnn -{ -namespace -{ - -// Make a workload of the specified WorkloadType. -template<typename WorkloadType> -struct MakeWorkloadForType -{ - template<typename QueueDescriptorType, typename... Args> - static std::unique_ptr<WorkloadType> Func(const QueueDescriptorType& descriptor, - const WorkloadInfo& info, - Args&&... args) - { - return std::make_unique<WorkloadType>(descriptor, info, std::forward<Args>(args)...); - } -}; - -// Specialization for void workload type used for unsupported workloads. -template<> -struct MakeWorkloadForType<NullWorkload> -{ - template<typename QueueDescriptorType, typename... Args> - static std::unique_ptr<NullWorkload> Func(const QueueDescriptorType& descriptor, - const WorkloadInfo& info, - Args&&... args) - { - return nullptr; - } -}; - -// Makes a workload for one the specified types based on the data type requirements of the tensorinfo. -// Specify type void as the WorkloadType for unsupported DataType/WorkloadType combos. -template <typename Float16Workload, typename Float32Workload, typename Uint8Workload, typename QueueDescriptorType, - typename... Args> -std::unique_ptr<IWorkload> MakeWorkloadHelper(const QueueDescriptorType& descriptor, - const WorkloadInfo& info, - Args&&... args) -{ - const DataType dataType = !info.m_InputTensorInfos.empty() ? - info.m_InputTensorInfos[0].GetDataType() - : info.m_OutputTensorInfos[0].GetDataType(); - - BOOST_ASSERT(info.m_InputTensorInfos.empty() || info.m_OutputTensorInfos.empty() - || info.m_InputTensorInfos[0].GetDataType() == info.m_OutputTensorInfos[0].GetDataType()); - - switch (dataType) - { - case DataType::Float16: - return MakeWorkloadForType<Float16Workload>::Func(descriptor, info, std::forward<Args>(args)...); - case DataType::Float32: - return MakeWorkloadForType<Float32Workload>::Func(descriptor, info, std::forward<Args>(args)...); - case DataType::QuantisedAsymm8: - return MakeWorkloadForType<Uint8Workload>::Func(descriptor, info, std::forward<Args>(args)...); - default: - BOOST_ASSERT_MSG(false, "Unknown DataType."); - return nullptr; - } -} - -// Makes a workload for one the specified types based on the data type requirements of the tensorinfo. -// Calling this method is the equivalent of calling the three typed MakeWorkload method with <FloatWorkload, -// FloatWorkload, Uint8Workload>. -// Specify type void as the WorkloadType for unsupported DataType/WorkloadType combos. -template <typename FloatWorkload, typename Uint8Workload, typename QueueDescriptorType, typename... Args> -std::unique_ptr<IWorkload> MakeWorkloadHelper(const QueueDescriptorType& descriptor, - const WorkloadInfo& info, - Args&&... args) -{ - return MakeWorkloadHelper<FloatWorkload, FloatWorkload, Uint8Workload>(descriptor, info, - std::forward<Args>(args)...); -} - - -} //namespace -} //namespace armnn |