Optimize OpenCL version of StereoBM function
Fix problems on NVidia devices.