| 156 | } |
| 157 | |
| 158 | bool 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 |
no test coverage detected