| 227 | } |
| 228 | |
| 229 | uint8_t *CLTensorAllocator::map(cl::CommandQueue &q, bool blocking) |
| 230 | { |
| 231 | ARM_COMPUTE_ERROR_ON(_mapping != nullptr); |
| 232 | ARM_COMPUTE_ERROR_ON(_memory.region() == nullptr); |
| 233 | ARM_COMPUTE_ERROR_ON(_memory.region()->buffer() != nullptr); |
| 234 | |
| 235 | _mapping = reinterpret_cast<uint8_t *>(_memory.cl_region()->map(q, blocking)); |
| 236 | return _mapping; |
| 237 | } |
| 238 | |
| 239 | void CLTensorAllocator::unmap(cl::CommandQueue &q, uint8_t *mapping) |
| 240 | { |