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

Method CanBeImported

src/backends/reference/RefTensorHandle.cpp:153–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153bool RefTensorHandle::CanBeImported(void *memory, MemorySource source)
154{
155 if (source == MemorySource::Malloc)
156 {
157 uintptr_t alignment = GetDataTypeSize(m_TensorInfo.GetDataType());
158 if (reinterpret_cast<uintptr_t>(memory) % alignment)
159 {
160 return false;
161 }
162 return true;
163 }
164 return false;
165}
166
167std::shared_ptr<ITensorHandle> RefTensorHandle::DecorateTensorHandle(const TensorInfo& tensorInfo)
168{

Callers 1

Calls 2

GetDataTypeSizeFunction · 0.85
GetDataTypeMethod · 0.45

Tested by

no test coverage detected