1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

ocl_calcOpticalFlowPyrLK optimizations

1. decrease branch number in CL code by replacing them into weights
2. decrease local mem pressure in reduce operation by using private variables
3. decrease image sampler pressure by caching data into local memory
4. remove unnecessary sync point on the HOST side.
This commit is contained in:
krodyush
2014-03-19 19:31:14 +04:00
parent a2dec6c34e
commit 65d64af2a8
2 changed files with 116 additions and 96 deletions
+1 -1
View File
@@ -989,7 +989,7 @@ namespace cv
idxArg = kernel.set(idxArg, (int)winSize.height); // int c_winSize_y
idxArg = kernel.set(idxArg, (int)iters); // int c_iters
idxArg = kernel.set(idxArg, (char)calcErr); //char calcErr
return kernel.run(2, globalThreads, localThreads, true);
return kernel.run(2, globalThreads, localThreads, false);
}
private:
inline static bool isDeviceCPU()