| 128 | : amd::Command(queue, 1, amd::Event::nullWaitList), ptr_(ptr), event_(event) {} |
| 129 | |
| 130 | virtual void submit(device::VirtualDevice& device) final { |
| 131 | size_t offset = 0; |
| 132 | auto memory = getMemoryObject(ptr_, offset); |
| 133 | if (memory != nullptr) { |
| 134 | auto id = memory->getUserData().deviceId; |
| 135 | if (!g_devices[id]->FreeMemory(memory, static_cast<hip::Stream*>(queue()), event_)) { |
| 136 | // @note It's not the most optimal logic. |
| 137 | // The current implementation has unconditional waits |
| 138 | if (ihipFree(ptr_) != hipSuccess) { |
| 139 | setStatus(CL_INVALID_OPERATION); |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | }; |
| 145 | |
| 146 | // ================================================================================================ |
nothing calls this directly
no test coverage detected