What is the purpose of ACCESS_FAST in OpenCV 3.0?

To get cv :: UMat from cv :: Mat in OpenCV 3.0, you use this function:

UMat cv::Mat::getUMat(int accessFlags, UMatUsageFlags usageFlags=USAGE_DEFAULT ) 

the variable accessFlags is an enum type that takes one of the values โ€‹โ€‹below:

 enum { ACCESS_READ=1<<24, ACCESS_WRITE=1<<25, ACCESS_RW=3<<24, ACCESS_MASK=ACCESS_RW, ACCESS_FAST=1<<26 }; 

What is the purpose of using the value of ACCESS_FAST ?

+5
source share
1 answer

ACCESS_FAST used only in allocate for the function use memcpy or create a temporary matte if ACCESS_FAST not specified. This has been added to OpenCV as part of its support for OpenCL Shared Virtual Memory.

cv::Mat::getUMat() will allocate new UMat and return it by forwarding accessFlags when distributing the new matrix. If you don't create OpenCV with OpenCL support, then ACCESS_FAST seems mostly useless.

I am afraid that the limit of my knowledge. Someone more experienced with OpenCV will need to provide a more detailed answer / documentation about what ACCESS_FAST .

+3
source

Source: https://habr.com/ru/post/1239304/


All Articles