MCPcopy Create free account
hub / github.com/ARM-software/armnn / Allocate

Method Allocate

src/backends/reference/RefTensorHandle.cpp:56–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void RefTensorHandle::Allocate()
57{
58 if (!m_UnmanagedMemory)
59 {
60 if (!m_Pool)
61 {
62 // unmanaged
63 m_UnmanagedMemory = ::operator new(m_TensorInfo.GetNumBytes());
64 }
65 else
66 {
67 m_MemoryManager->Allocate(m_Pool);
68 }
69 }
70 else
71 {
72 throw InvalidArgumentException("RefTensorHandle::Allocate Trying to allocate a RefTensorHandle"
73 "that already has allocated memory.");
74 }
75}
76
77const void* RefTensorHandle::Map(bool /*unused*/) const
78{

Calls 2

GetNumBytesMethod · 0.45