Merge pull request #2257 from ilya-lavrenov:tapi_opencl_game2

This commit is contained in:
Andrey Pavlenko 2014-02-03 14:26:05 +04:00 committed by OpenCV Buildbot
commit 13875b5fbc

View File

@ -644,21 +644,23 @@ void UMat::copyTo(OutputArray _dst) const
srcofs[dims-1] *= esz; srcofs[dims-1] *= esz;
_dst.create( dims, size.p, type() ); _dst.create( dims, size.p, type() );
if( _dst.kind() == _InputArray::UMAT ) if( _dst.isUMat() )
{ {
UMat dst = _dst.getUMat(); UMat dst = _dst.getUMat();
if( u == dst.u && dst.offset == offset ) if( u == dst.u && dst.offset == offset )
return; return;
dst.ndoffset(dstofs);
dstofs[dims-1] *= esz; if (u->currAllocator == dst.u->currAllocator)
CV_Assert(u->currAllocator == dst.u->currAllocator); {
u->currAllocator->copy(u, dst.u, dims, sz, srcofs, step.p, dstofs, dst.step.p, false); dst.ndoffset(dstofs);
} dstofs[dims-1] *= esz;
else u->currAllocator->copy(u, dst.u, dims, sz, srcofs, step.p, dstofs, dst.step.p, false);
{ return;
Mat dst = _dst.getMat(); }
u->currAllocator->download(u, dst.data, dims, sz, srcofs, step.p, dst.step.p);
} }
Mat dst = _dst.getMat();
u->currAllocator->download(u, dst.data, dims, sz, srcofs, step.p, dst.step.p);
} }
void UMat::copyTo(OutputArray _dst, InputArray _mask) const void UMat::copyTo(OutputArray _dst, InputArray _mask) const