OpenCLAllocator::upload() unnecessary loop slow down the operation (Bug #3488)
Description
Puzzled on the strange slowness for `Mat.copyTo(UMat)`. By checking out the code found
core\src\ocl.cpp, around line 3539 with unnecessary crc looping. Please fix it. It does slow down the operation significantly(x10 tested on 60x30MByte of data). Thank you.
if( iscontinuous ) { int crc = 0; for( size_t i = 0; i < total; i++ ) crc ^= ((uchar*)srcptr)[i]; CV_Assert( clEnqueueWriteBuffer(q, (cl_mem)u->handle, CL_TRUE, dstrawofs, total, srcptr, 0, 0, 0) >= 0 ); }
Associated revisions
Merge pull request #3488 from jeremyhu:PR-4048
History
Updated by Alexander Smorkalov about 11 years ago
- Category set to ocl
- Target version set to 3.0-alpha
Updated by Ilya Lavrenov about 11 years ago
Hi Hui, thanks for the bug report.
The problem you mentioned has been fixed in https://github.com/Itseez/opencv/pull/2165
- Assignee set to Ilya Lavrenov
- Status changed from New to Open
- % Done changed from 0 to 100
- Pull request set to https://github.com/Itseez/opencv/pull/2165
Updated by Andrew Senin about 11 years ago
Please reopen if you think the problem is not yet solved
- Status changed from Open to Done