ArmNN
 24.02
MemoryOptimizerStrategyFactory.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 #include <algorithm>
11 
12 namespace armnn
13 {
14 
16 {
17  virtual ~IMemoryOptimizerStrategyFactory() = default;
18  virtual std::unique_ptr<IMemoryOptimizerStrategy> CreateMemoryOptimizerStrategy() = 0;
19 };
20 
21 template <typename T>
23 {
24  std::unique_ptr<IMemoryOptimizerStrategy> CreateMemoryOptimizerStrategy() override
25  {
26  return std::make_unique<T>();
27  }
28 };
29 
30 } // namespace armnn
IMemoryOptimizerStrategy.hpp
armnn::StrategyFactory
Definition: MemoryOptimizerStrategyFactory.hpp:22
armnn::StrategyFactory::CreateMemoryOptimizerStrategy
std::unique_ptr< IMemoryOptimizerStrategy > CreateMemoryOptimizerStrategy() override
Definition: MemoryOptimizerStrategyFactory.hpp:24
armnn::IMemoryOptimizerStrategyFactory::~IMemoryOptimizerStrategyFactory
virtual ~IMemoryOptimizerStrategyFactory()=default
armnn::IMemoryOptimizerStrategyFactory::CreateMemoryOptimizerStrategy
virtual std::unique_ptr< IMemoryOptimizerStrategy > CreateMemoryOptimizerStrategy()=0
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::IMemoryOptimizerStrategyFactory
Definition: MemoryOptimizerStrategyFactory.hpp:15