| 70 | } |
| 71 | |
| 72 | CLBufferMemoryRegion::~CLBufferMemoryRegion() |
| 73 | { |
| 74 | // Flush the command queue to ensure all commands that may use this memory buffer are scheduled to be finished before |
| 75 | // this buffer is freed |
| 76 | // Do not call finish as it is a blocking call which affects the performance |
| 77 | try |
| 78 | { |
| 79 | CLScheduler::get().queue().flush(); |
| 80 | } |
| 81 | catch (const std::exception &e) |
| 82 | { |
| 83 | ARM_COMPUTE_LOG_ERROR_ACL(e.what()); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void *CLBufferMemoryRegion::ptr() |
| 88 | { |