MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / allocate

Method allocate

src/runtime/TensorAllocator.cpp:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void TensorAllocator::allocate()
134{
135 // Align to 64-byte boundaries by default if alignment is not specified
136 const size_t alignment_to_use = (alignment() != 0) ? alignment() : 64;
137 if (_associated_memory_group == nullptr)
138 {
139 _memory.set_owned_region(std::make_unique<MemoryRegion>(info().total_size(), alignment_to_use));
140 }
141 else
142 {
143 _associated_memory_group->finalize_memory(_owner, _memory, info().total_size(), alignment_to_use);
144 }
145 info().set_is_resizable(false);
146}
147
148void TensorAllocator::free()
149{

Callers

nothing calls this directly

Calls 4

infoClass · 0.85
finalize_memoryMethod · 0.80
set_owned_regionMethod · 0.45
total_sizeMethod · 0.45

Tested by

no test coverage detected