diff options
author | David Beck <david.beck@arm.com> | 2018-10-03 11:42:42 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-10 16:16:58 +0100 |
commit | dcb751f338b86c811a35bd0a9413ba9b8df7b718 (patch) | |
tree | bda3027fe7d958383eaa85105f611bfc07c3838c /include/armnn/Types.hpp | |
parent | 3041e3036398048b4f8b72e0a321d77cd222a2fa (diff) | |
download | armnn-dcb751f338b86c811a35bd0a9413ba9b8df7b718.tar.gz |
IVGCVSW-1642 : introducing the IBackend interface
Change-Id: Iaadee0a08c0594c9a3c802a48fe346e15f2cbbb2
Diffstat (limited to 'include/armnn/Types.hpp')
-rw-r--r-- | include/armnn/Types.hpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp index 172df1b454..d0a0174ecd 100644 --- a/include/armnn/Types.hpp +++ b/include/armnn/Types.hpp @@ -5,6 +5,7 @@ #pragma once #include <array> +#include <memory> namespace armnn { @@ -67,9 +68,9 @@ enum class PoolingAlgorithm enum class PaddingMethod { /// The padding fields count, but are ignored - IgnoreValue = 0, + IgnoreValue = 0, /// The padding fields don't count and are ignored - Exclude = 1 + Exclude = 1 }; enum class NormalizationAlgorithmChannel @@ -80,9 +81,9 @@ enum class NormalizationAlgorithmChannel enum class NormalizationAlgorithmMethod { - /// Krichevsky 2012: Local Brightness Normalization - LocalBrightness = 0, - /// Jarret 2009: Local Contrast Normalization + /// Krichevsky 2012: Local Brightness Normalization + LocalBrightness = 0, + /// Jarret 2009: Local Contrast Normalization LocalContrast = 1 }; @@ -95,14 +96,28 @@ enum class OutputShapeRounding enum class Compute { /// CPU Execution: Reference C++ kernels - CpuRef = 0, + CpuRef = 0, /// CPU Execution: NEON: ArmCompute - CpuAcc = 1, + CpuAcc = 1, /// GPU Execution: OpenCL: ArmCompute - GpuAcc = 2, + GpuAcc = 2, Undefined = 5 }; +/// Each backend should implement an IBackend. +class IBackend +{ +protected: + IBackend() {} + virtual ~IBackend() {} + +public: + virtual const std::string& GetId() const = 0; +}; + +using IBackendPtr = std::shared_ptr<IBackend>; + +/// Device specific knowledge to be passed to the optimizer. class IDeviceSpec { protected: |