Itseez/opencv — pull request #3381 by Chuanbo-Weng (2014-10-29 09:55:45+00:00)
Title: OCL: Create cl buffer when UMat switch from OpenCL off to OpenCL on.

When UMat is created when OpenCL is off, the data buffer in UMatData
is allocated from cpu side. However, if OpenCL is then on, cl buffer
will not be allocated for this UMat. As a result, if this UMat is used
as a parameter of cl kernel, OpenCL path will fail and fall back to
cpu path. With this patch, the sample tapi-example-hog will run
correctly when switch between CPU and OpenCL mode.

Signed-off-by: Chuanbo Weng