ArmNN
 24.08
GpuFsaTensorHandleFactory.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
10 
11 namespace armnn
12 {
13 
14 constexpr const char * GpuFsaTensorHandleFactoryId() { return "Arm/GpuFsa/TensorHandleFactory"; }
15 
17 {
18 
19 public:
20  GpuFsaTensorHandleFactory(std::shared_ptr<GpuFsaMemoryManager> mgr)
21  : m_MemoryManager(mgr)
22  {}
23 
24  std::unique_ptr<ITensorHandle> CreateSubTensorHandle(ITensorHandle& parent,
25  TensorShape const& subTensorShape,
26  unsigned int const* subTensorOrigin) const override;
27 
28  std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo) const override;
29 
30  std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
31  DataLayout dataLayout) const override;
32 
33  std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
34  const bool IsMemoryManaged) const override;
35 
36  std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
37  DataLayout dataLayout,
38  const bool IsMemoryManaged) const override;
39 
40  static const FactoryId& GetIdStatic();
41 
42  const FactoryId& GetId() const override;
43 
44  bool SupportsSubTensors() const override;
45 
46  MemorySourceFlags GetExportFlags() const override;
47 
48  MemorySourceFlags GetImportFlags() const override;
49 
50 private:
51  mutable std::shared_ptr<GpuFsaMemoryManager> m_MemoryManager;
52 
53 };
54 
55 } // namespace armnn
armnn::DataLayout
DataLayout
Definition: Types.hpp:62
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::GpuFsaTensorHandleFactory::GetIdStatic
static const FactoryId & GetIdStatic()
Definition: GpuFsaTensorHandleFactory.cpp:86
armnn::MemorySourceFlags
unsigned int MemorySourceFlags
Definition: MemorySources.hpp:15
ITensorHandleFactory.hpp
BaseMemoryManager.hpp
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::GpuFsaTensorHandleFactory::GetExportFlags
MemorySourceFlags GetExportFlags() const override
Definition: GpuFsaTensorHandleFactory.cpp:102
armnn::TensorShape
Definition: Tensor.hpp:20
armnn::FactoryId
ITensorHandleFactory::FactoryId FactoryId
Definition: MockTensorHandleFactory.cpp:12
armnn::GpuFsaTensorHandleFactory::SupportsSubTensors
bool SupportsSubTensors() const override
Definition: GpuFsaTensorHandleFactory.cpp:97
armnn::GpuFsaTensorHandleFactoryId
constexpr const char * GpuFsaTensorHandleFactoryId()
Definition: GpuFsaTensorHandleFactory.hpp:14
armnn::ITensorHandleFactory
Definition: ITensorHandleFactory.hpp:46
armnn::GpuFsaTensorHandleFactory::GetImportFlags
MemorySourceFlags GetImportFlags() const override
Definition: GpuFsaTensorHandleFactory.cpp:107
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::GpuFsaTensorHandleFactory::CreateSubTensorHandle
std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, TensorShape const &subTensorShape, unsigned int const *subTensorOrigin) const override
Definition: GpuFsaTensorHandleFactory.cpp:14
armnn::GpuFsaTensorHandleFactory::GpuFsaTensorHandleFactory
GpuFsaTensorHandleFactory(std::shared_ptr< GpuFsaMemoryManager > mgr)
Definition: GpuFsaTensorHandleFactory.hpp:20
armnn::GpuFsaTensorHandleFactory::CreateTensorHandle
std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const override
Definition: GpuFsaTensorHandleFactory.cpp:50
armnn::GpuFsaTensorHandleFactory::GetId
const FactoryId & GetId() const override
Definition: GpuFsaTensorHandleFactory.cpp:92
armnn::GpuFsaTensorHandleFactory
Definition: GpuFsaTensorHandleFactory.hpp:16