added cv::repeat to T-API (fix for copyTo -> UMat is needed)

This commit is contained in:
Ilya Lavrenov 2013-12-01 01:57:13 +04:00
parent e17107e864
commit fed7e61879
3 changed files with 6 additions and 15 deletions

View File

@ -2626,12 +2626,9 @@ void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ || CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ ||
op == CMP_NE || op == CMP_GE || op == CMP_GT ); op == CMP_NE || op == CMP_GE || op == CMP_GT );
if (ocl::useOpenCL() && _dst.isUMat() /*&& if (ocl::useOpenCL() && _dst.isUMat() &&
ocl_compare(_src1, _src2, _dst, op)*/) ocl_compare(_src1, _src2, _dst, op))
{
CV_Assert(ocl_compare(_src1, _src2, _dst, op));
return; return;
}
int kind1 = _src1.kind(), kind2 = _src2.kind(); int kind1 = _src1.kind(), kind2 = _src2.kind();
Mat src1 = _src1.getMat(), src2 = _src2.getMat(); Mat src1 = _src1.getMat(), src2 = _src2.getMat();

View File

@ -534,12 +534,9 @@ static bool ocl_cartToPolar( InputArray _src1, InputArray _src2,
void cartToPolar( InputArray src1, InputArray src2, void cartToPolar( InputArray src1, InputArray src2,
OutputArray dst1, OutputArray dst2, bool angleInDegrees ) OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{ {
if (ocl::useOpenCL() && dst1.isUMat() && dst2.isUMat() /*&& if (ocl::useOpenCL() && dst1.isUMat() && dst2.isUMat() &&
ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees)*/) ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees))
{
CV_Assert(ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees));
return; return;
}
Mat X = src1.getMat(), Y = src2.getMat(); Mat X = src1.getMat(), Y = src2.getMat();
int type = X.type(), depth = X.depth(), cn = X.channels(); int type = X.type(), depth = X.depth(), cn = X.channels();
@ -2062,11 +2059,8 @@ static bool ocl_pow(InputArray _src, double power, OutputArray _dst)
void pow( InputArray _src, double power, OutputArray _dst ) void pow( InputArray _src, double power, OutputArray _dst )
{ {
if (ocl::useOpenCL() && _dst.isUMat() /*&& ocl_pow(_src, power, _dst)*/) if (ocl::useOpenCL() && _dst.isUMat() && ocl_pow(_src, power, _dst))
{
CV_Assert(ocl_pow(_src, power, _dst));
return; return;
}
Mat src = _src.getMat(); Mat src = _src.getMat();
int type = src.type(), depth = src.depth(), cn = src.channels(); int type = src.type(), depth = src.depth(), cn = src.channels();

View File

@ -1893,7 +1893,7 @@ Context2& Context2::getDefault()
// First, try to retrieve existing context of the same type. // First, try to retrieve existing context of the same type.
// In its turn, Platform::getContext() may call Context2::create() // In its turn, Platform::getContext() may call Context2::create()
// if there is no such context. // if there is no such context.
ctx.create(Device::TYPE_CPU); ctx.create(Device::TYPE_ACCELERATOR);
if(!ctx.p) if(!ctx.p)
ctx.create(Device::TYPE_DGPU); ctx.create(Device::TYPE_DGPU);
if(!ctx.p) if(!ctx.p)