24.02
StrategyValidator.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
#pragma once
6
7
#include <
armnn/Types.hpp
>
8
#include <
armnn/Exceptions.hpp
>
9
#include <
armnn/backends/IMemoryOptimizerStrategy.hpp
>
10
11
namespace
armnn
12
{
13
14
class
StrategyValidator
:
public
IMemoryOptimizerStrategy
15
{
16
public
:
17
18
void
SetStrategy
(std::shared_ptr<IMemoryOptimizerStrategy> strategy)
19
{
20
m_Strategy = strategy;
21
m_MemBlockStrategyType = strategy->GetMemBlockStrategyType();
22
}
23
24
std::string
GetName
()
const override
25
{
26
return
"StrategyValidator"
;
27
}
28
29
MemBlockStrategyType
GetMemBlockStrategyType
()
const override
30
{
31
return
m_MemBlockStrategyType;
32
}
33
34
std::vector<MemBin>
Optimize
(std::vector<MemBlock>& memBlocks)
override
;
35
36
private
:
37
std::shared_ptr<IMemoryOptimizerStrategy> m_Strategy;
38
MemBlockStrategyType
m_MemBlockStrategyType;
39
};
40
41
}
// namespace armnn
armnn::StrategyValidator::Optimize
std::vector< MemBin > Optimize(std::vector< MemBlock > &memBlocks) override
Definition:
StrategyValidator.cpp:13
armnn::StrategyValidator::GetName
std::string GetName() const override
Definition:
StrategyValidator.hpp:24
IMemoryOptimizerStrategy.hpp
armnn::StrategyValidator
Definition:
StrategyValidator.hpp:14
armnn::StrategyValidator::SetStrategy
void SetStrategy(std::shared_ptr< IMemoryOptimizerStrategy > strategy)
Definition:
StrategyValidator.hpp:18
armnn::IMemoryOptimizerStrategy
Definition:
IMemoryOptimizerStrategy.hpp:45
armnn::MemBlockStrategyType
MemBlockStrategyType
Definition:
Types.hpp:253
armnn::StrategyValidator::GetMemBlockStrategyType
MemBlockStrategyType GetMemBlockStrategyType() const override
Definition:
StrategyValidator.hpp:29
Exceptions.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:6
Types.hpp
src
backends
backendsCommon
memoryOptimizerStrategyLibrary
strategies
StrategyValidator.hpp
Generated on Wed Feb 14 2024 16:36:15 for Arm NN by
1.8.17