I am trying to understand the opencl context creation and memory allocation order.
If I have a (pseudo)code of the following sequence
cv::UMat oldMat;
cl_context_properties props = {glxSharingContextForLinuxCallsHere(),0)};
cl::Context context(NVIDIAdev, props);
cv::ocl::attachContext(myPlatform.getInfo<CL_PLATFORM_NAME>()
, myPlatform(), context(), NVIDIAdev());
cv::UMat newMat;
Is the oldMat
created in some context and newMat
created in the newly attached context? Am I correct in understanding this?
Is there a way to get the oldMat onto the new context apart form creating a new and copying the data?
Its my first post on this forum, so apologies if I am ignoring some obvious requirements.
Thanks in advance