Chuanbo Weng
c5552788c5
Use vload to read unaligned data instead of dereference operator.
According to opencl 1.2 spec 6.1.5: For arguments to a __kernel function declared to be a pointer to a data type, the OpenCL compiler can assume that the pointee is always appropriately aligned as required by the data type. The behavior of an unaligned load or store is undefined, except for the vloadn, vload_halfn, vstoren, and vstore_halfn functions defined in section 6.12.7. Original code read data of type T from address not aligned by multiple of sizeof(T), so the result is incorrect. With this patch, the cases ./opencv_perf_imgproc --gtest_filter=OCL_ImgSize_TmplSize_Method_MatType_MatchTemplate.MatchTemplate/* could work well with beignet 0.9.3. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
OpenCV: Open Source Computer Vision Library
Resources
- Homepage: http://opencv.org
- Docs: http://docs.opencv.org
- Q&A forum: http://answers.opencv.org
- Issue tracking: http://code.opencv.org
Contributing
Please read before starting work on a pull request: http://code.opencv.org/projects/opencv/wiki/How_to_contribute
Summary of guidelines:
- One pull request per issue;
- Choose the right base branch;
- Include tests and documentation;
- Clean up "oops" commits before submitting;
- Follow the coding style guide.
Description
Languages
C++
83.4%
Cuda
5.9%
C
3.8%
Java
2.4%
CMake
2.2%
Other
2.1%