8 unsigned int maxLifetime = 0;
9 for (
auto& block: blocks)
11 maxLifetime = std::max(maxLifetime, block.m_EndOfLife);
15 std::vector<size_t> lifetimes(maxLifetime);
16 for (
const auto& block : blocks)
18 for (
auto lifetime = block.m_StartOfLife; lifetime <= block.m_EndOfLife; ++lifetime)
20 lifetimes[lifetime] += block.m_MemSize;
23 return *std::max_element(lifetimes.begin(), lifetimes.end());
27 std::vector<armnn::MemBlock>
fsrcnn 29 { 0, 1, 691200, 0, 0 },
30 { 1, 3, 7372800, 0, 1 },
31 { 2, 5, 7372800, 0, 2 },
32 { 3, 7, 1843200, 0, 3 },
33 { 4, 9, 1843200, 0, 4 },
34 { 5, 11, 1843200, 0, 5 },
35 { 6, 13, 1843200, 0, 6 },
36 { 7, 15, 1843200, 0, 7 },
37 { 8, 17, 1843200, 0, 8 },
38 { 9, 19, 7372800, 0, 9 },
39 { 10, 21, 7372800, 0, 10 },
40 { 11, 23, 2764800, 0, 11 },
41 { 12, 25, 2764800, 0, 12 },
42 { 13, 27, 2764800, 0, 13 }
std::vector< armnn::MemBlock > fsrcnn
size_t GetMinPossibleMemorySize(const std::vector< armnn::MemBlock > &blocks)