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

Method import_memory

src/runtime/TensorAllocator.cpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159Status TensorAllocator::import_memory(void *memory)
160{
161 ARM_COMPUTE_RETURN_ERROR_ON(memory == nullptr);
162 ARM_COMPUTE_RETURN_ERROR_ON(_associated_memory_group != nullptr);
163 ARM_COMPUTE_RETURN_ERROR_ON(alignment() != 0 && !arm_compute::utility::check_aligned(memory, alignment()));
164
165 _memory.set_owned_region(std::make_unique<MemoryRegion>(memory, info().total_size()));
166 info().set_is_resizable(false);
167
168 return Status{};
169}
170
171void TensorAllocator::set_associated_memory_group(IMemoryGroup *associated_memory_group)
172{

Callers 7

CLAuxTensorHandlerMethod · 0.45
importMethod · 0.45
CpuAuxTensorHandlerMethod · 0.45
runMethod · 0.45
runMethod · 0.45
TEST_CASEFunction · 0.45
TEST_CASEFunction · 0.45

Calls 4

check_alignedFunction · 0.85
infoClass · 0.85
set_owned_regionMethod · 0.45
total_sizeMethod · 0.45

Tested by

no test coverage detected