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
8
#include <
armnn/backends/IMemoryOptimizerStrategy.hpp
>
9
10
#include <algorithm>
11
12
namespace
armnn
13
{
14
15
struct
IMemoryOptimizerStrategyFactory
16
{
17
virtual
~IMemoryOptimizerStrategyFactory
() =
default
;
18
virtual
std::unique_ptr<IMemoryOptimizerStrategy>
CreateMemoryOptimizerStrategy
() = 0;
19
};
20
21
template
<
typename
T>
22
struct
StrategyFactory
:
public
IMemoryOptimizerStrategyFactory
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
src
backends
backendsCommon
memoryOptimizerStrategyLibrary
MemoryOptimizerStrategyFactory.hpp
Generated on Wed Feb 14 2024 16:36:15 for Arm NN by
1.8.17