ArmNN
 24.08
ConstantMemoryStrategy.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>
9 
10 namespace armnn
11 {
12 // ConstLayerMemoryOptimizer: Create a unique MemBin for each MemBlock and assign it an offset of 0
14 {
15 public:
17  : m_Name(std::string("ConstantMemoryStrategy"))
18  , m_MemBlockStrategyType(MemBlockStrategyType::SingleAxisPacking) {}
19 
20  std::string GetName() const override;
21 
23 
24  std::vector<MemBin> Optimize(std::vector<MemBlock>& memBlocks) override;
25 
26 private:
27  std::string m_Name;
28  MemBlockStrategyType m_MemBlockStrategyType;
29 };
30 
31 } // namespace armnn
IMemoryOptimizerStrategy.hpp
armnn::ConstantMemoryStrategy::ConstantMemoryStrategy
ConstantMemoryStrategy()
Definition: ConstantMemoryStrategy.hpp:16
armnn::IMemoryOptimizerStrategy
Definition: IMemoryOptimizerStrategy.hpp:45
armnn::MemBlockStrategyType
MemBlockStrategyType
Definition: Types.hpp:253
armnn::MemBlockStrategyType::SingleAxisPacking
@ SingleAxisPacking
armnn::ConstantMemoryStrategy::GetName
std::string GetName() const override
Definition: ConstantMemoryStrategy.cpp:11
std
Definition: BackendId.hpp:149
armnn::ConstantMemoryStrategy
Definition: ConstantMemoryStrategy.hpp:13
armnn::ConstantMemoryStrategy::GetMemBlockStrategyType
MemBlockStrategyType GetMemBlockStrategyType() const override
Definition: ConstantMemoryStrategy.cpp:16
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
Types.hpp
armnn::ConstantMemoryStrategy::Optimize
std::vector< MemBin > Optimize(std::vector< MemBlock > &memBlocks) override
Definition: ConstantMemoryStrategy.cpp:25