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

Method CanBeImported

src/armnnTestUtils/MockTensorHandle.cpp:158–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158bool MockTensorHandle::CanBeImported(void* memory, MemorySource source)
159{
160 if (m_ImportFlags & static_cast<MemorySourceFlags>(source))
161 {
162 if (m_IsImportEnabled && source == MemorySource::Malloc)
163 {
164 uintptr_t alignment = GetDataTypeSize(m_TensorInfo.GetDataType());
165 if (reinterpret_cast<uintptr_t>(memory) % alignment)
166 {
167 return false;
168 }
169
170 return true;
171 }
172 }
173 return false;
174}
175
176} // namespace armnn

Callers 2

ImportInputsMethod · 0.45
ImportOutputsMethod · 0.45

Calls 2

GetDataTypeSizeFunction · 0.85
GetDataTypeMethod · 0.45

Tested by

no test coverage detected