-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Improve UMatUsageFlags documentation #20765
Copy link
Copy link
Closed
Labels
category: corecategory: documentationDocumentation fix or updateDocumentation fix or updatecategory: oclcategory: t-apicv::UMat related issuescv::UMat related issues
Milestone
Description
The documentation of UMatUsageFlags does not shed much light on what each flag really does. I suggest that the documentation should be revised to clarify at least the following points:
USAGE_DEFAULTis equivalent toUSAGE_ALLOCATE_DEVICE_MEMORY.USAGE_ALLOCATE_SHARED_MEMORYdepends on Shared Virtual Memory (SVM). For it to work as intended, it needs OpenCV to be built using theWITH_OPENCL_SVMCMake option (which is off by default), it needs to be running on a compatible OpenCL 2 device, and it needs SVM to be enabled viacv::ocl::Context::setUseSVM(true). If these conditions are not met, it falls back to an equivalent ofUSAGE_ALLOCATE_DEVICE_MEMORY(or possibly just fails with an exception in the case of an incompatible OpenCL device).
(The above is my understanding from reading the ocl.cpp source code, but if any of this is wrong, please correct me.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: corecategory: documentationDocumentation fix or updateDocumentation fix or updatecategory: oclcategory: t-apicv::UMat related issuescv::UMat related issues