diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-10-19 17:35:30 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2020-10-19 16:34:15 +0000 |
commit | 3c24f43ff9afb50898d6a73ccddbc0936f72fdad (patch) | |
tree | b4101aab6f085279cddefdc539fb3f622fc8a1b7 /delegate/include/DelegateOptions.hpp | |
parent | 418c7dd833accc061ba4cba2743631e582962915 (diff) | |
download | armnn-3c24f43ff9afb50898d6a73ccddbc0936f72fdad.tar.gz |
IVGCVSW-5365 'Create the TfLite Delegate subdirectory in ArmNN'
* Created delegate sub-directory under armnn
* Created Delegate, ArmnnSubgraph and DelegateOptions classes
* Created cmake files.
* Integrated doctest (under MIT license) as testing framework
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: If725ebd62c40a97c783cdad22bca48709d44338c
Diffstat (limited to 'delegate/include/DelegateOptions.hpp')
-rw-r--r-- | delegate/include/DelegateOptions.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/delegate/include/DelegateOptions.hpp b/delegate/include/DelegateOptions.hpp new file mode 100644 index 0000000000..0c8173d15f --- /dev/null +++ b/delegate/include/DelegateOptions.hpp @@ -0,0 +1,35 @@ +// +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <armnn/ArmNN.hpp> + +#include <set> +#include <string> +#include <vector> + +namespace armnnDelegate +{ + +class DelegateOptions +{ +public: + DelegateOptions(armnn::Compute computeDevice); + + DelegateOptions(const std::vector<armnn::BackendId>& backends); + + const std::vector<armnn::BackendId>& GetBackends() const { return m_Backends; } + + void SetBackends(const std::vector<armnn::BackendId>& backends) { m_Backends = backends; } + +private: + /// Which backend to run Delegate on. + /// Examples of possible values are: CpuRef, CpuAcc, GpuAcc. + /// CpuRef as default. + std::vector<armnn::BackendId> m_Backends = { armnn::Compute::CpuRef }; +}; + +} // namespace armnnDelegate |