3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-15 03:35:55 +00:00
Scare Crowe d2ebfd0519 QortalOS Titan 5.60.12
Screw the description like that inbred T3Q
2022-03-05 21:17:59 +05:00

43 lines
1.1 KiB
C++

//
// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "TestStrategy.hpp"
namespace armnn
{
std::string TestStrategy::GetName() const
{
return m_Name;
}
MemBlockStrategyType TestStrategy::GetMemBlockStrategyType() const
{
return m_MemBlockStrategyType;
}
// A IMemoryOptimizerStrategy must ensure that
// 1: All MemBlocks have been assigned to a MemBin
// 2: No MemBlock is assigned to multiple MemBins
// 3: No two Memblocks in a MemBin overlap in both the X and Y axis
std::vector<MemBin> TestStrategy::Optimize(std::vector<MemBlock>& memBlocks)
{
std::vector<MemBin> memBins;
memBins.reserve(memBlocks.size());
for (auto& memBlock : memBlocks)
{
MemBin memBin;
memBin.m_MemSize = memBlock.m_MemSize;
memBin.m_MemBlocks.reserve(1);
memBlock.m_Offset = 0;
memBin.m_MemBlocks.push_back(memBlock);
memBins.push_back(memBin);
}
return memBins;
}
} // namespace armnn