diff options
author | James Conroy <james.conroy@arm.com> | 2021-04-27 17:13:27 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-05-06 14:40:40 +0000 |
commit | 1f58f03d82c482626b1b4673b6c0e25da4338fb5 (patch) | |
tree | e92451e00d459a2fc0d870694460f482aa4c77ae /src/armnn/optimizations/ConvertConstants.hpp | |
parent | a7a12f5c3654da554ad6197beff0f0fc54681c92 (diff) | |
download | armnn-1f58f03d82c482626b1b4673b6c0e25da4338fb5.tar.gz |
IVGCVSW-5815 Generalise ConstCpuTensorHandle
* Generalises ConstCpuTensorHandle and inherited
classes by removing 'Cpu' from aliases.
* New renamed classes: ConstTensorHandle, TensorHandle,
ScopedTensorHandle, PassthroughTensorHandle,
ConstPassthroughTensorHandle.
Signed-off-by: James Conroy <james.conroy@arm.com>
Change-Id: I1824e0e134202735fb77051f20a7252f161dfe16
Diffstat (limited to 'src/armnn/optimizations/ConvertConstants.hpp')
-rw-r--r-- | src/armnn/optimizations/ConvertConstants.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/armnn/optimizations/ConvertConstants.hpp b/src/armnn/optimizations/ConvertConstants.hpp index df5a5b4f67..66b3d2685a 100644 --- a/src/armnn/optimizations/ConvertConstants.hpp +++ b/src/armnn/optimizations/ConvertConstants.hpp @@ -9,7 +9,7 @@ #include <armnnUtils/FloatingPointConverter.hpp> -#include <backendsCommon/CpuTensorHandle.hpp> +#include <backendsCommon/TensorHandle.hpp> #include <armnn/utility/IgnoreUnused.hpp> @@ -23,7 +23,7 @@ namespace optimizations struct BFloat16ToFloat32 { - static void Func(std::shared_ptr<ConstCpuTensorHandle>& handle) + static void Func(std::shared_ptr<ConstTensorHandle>& handle) { const TensorInfo& info = handle->GetTensorInfo(); @@ -37,14 +37,14 @@ struct BFloat16ToFloat32 TensorInfo newInfo(info.GetShape(), DataType::Float32); ConstTensor newInput(newInfo, newValues); - handle.reset(new ScopedCpuTensorHandle(newInput)); + handle.reset(new ScopedTensorHandle(newInput)); } } }; struct Float16ToFloat32 { - static void Func(std::shared_ptr<ConstCpuTensorHandle>& handle) + static void Func(std::shared_ptr<ConstTensorHandle>& handle) { const TensorInfo& info = handle->GetTensorInfo(); @@ -58,14 +58,14 @@ struct Float16ToFloat32 TensorInfo newInfo(info.GetShape(), DataType::Float32); ConstTensor newInput(newInfo, newValues); - handle.reset(new ScopedCpuTensorHandle(newInput)); + handle.reset(new ScopedTensorHandle(newInput)); } } }; struct Float32ToBFloat16 { - static void Func(std::shared_ptr<ConstCpuTensorHandle>& handle) + static void Func(std::shared_ptr<ConstTensorHandle>& handle) { const TensorInfo& info = handle->GetTensorInfo(); @@ -79,14 +79,14 @@ struct Float32ToBFloat16 TensorInfo newInfo(info.GetShape(), DataType::BFloat16); ConstTensor newInput(newInfo, newValues); - handle.reset(new ScopedCpuTensorHandle(newInput)); + handle.reset(new ScopedTensorHandle(newInput)); } } }; struct Float32ToFloat16 { - static void Func(std::shared_ptr<ConstCpuTensorHandle>& handle) + static void Func(std::shared_ptr<ConstTensorHandle>& handle) { const TensorInfo& info = handle->GetTensorInfo(); @@ -100,7 +100,7 @@ struct Float32ToFloat16 TensorInfo newInfo(info.GetShape(), DataType::Float16); ConstTensor newInput(newInfo, newValues); - handle.reset(new ScopedCpuTensorHandle(newInput)); + handle.reset(new ScopedTensorHandle(newInput)); } } }; |