20 inline namespace _V1 {
27 auto Iter = std::find_if(std::begin(MMemObjs), std::end(MMemObjs),
28 [=](ReqToMem Elem) {
return (Elem.first == Req); });
30 if (Iter == std::end(MMemObjs)) {
31 throw invalid_object_error(
"Invalid memory object used inside interop",
32 PI_ERROR_INVALID_MEM_OBJECT);
35 auto Plugin = MQueue->getPlugin();
38 Iter->second, MDevice->getHandleRef(), &Handle);
43 return MDevice->getNative();
47 return MContext->getNative();
51 interop_handle::getNativeQueue(int32_t &NativeHandleDesc)
const {
52 return MQueue->getNative(NativeHandleDesc);
backend get_backend() const noexcept
Returns a backend associated with the queue associated with this interop_handle.
backend getImplBackend(const T &Impl)
pi_result piextMemGetNativeHandle(pi_mem mem, pi_device dev, pi_native_handle *nativeHandle)
Gets the native handle of a PI mem object.
uintptr_t pi_native_handle
_Abi const simd< _Tp, _Abi > & noexcept