Commit 28ac23c1 authored by peng xiao's avatar peng xiao

If device does not support double, returns immediately.

Double floating points are not default supported by OpenCL.
parent 0b41df46
......@@ -131,6 +131,11 @@ typedef ConvertToTestBase ConvertTo;
TEST_P(ConvertTo, Accuracy)
{
if((src_depth == CV_64F || dst_depth == CV_64F) &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......@@ -222,6 +227,11 @@ typedef CopyToTestBase CopyTo;
TEST_P(CopyTo, Without_mask)
{
if((src.depth() == CV_64F) &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......@@ -235,6 +245,11 @@ TEST_P(CopyTo, Without_mask)
TEST_P(CopyTo, With_mask)
{
if(src.depth() == CV_64F &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......@@ -326,6 +341,11 @@ typedef SetToTestBase SetTo;
TEST_P(SetTo, Without_mask)
{
if(depth == CV_64F &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......@@ -339,6 +359,11 @@ TEST_P(SetTo, Without_mask)
TEST_P(SetTo, With_mask)
{
if(depth == CV_64F &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......@@ -404,6 +429,11 @@ PARAM_TEST_CASE(convertC3C4, MatType, bool)
TEST_P(convertC3C4, Accuracy)
{
if(depth == CV_64F &&
!cv::ocl::Context::getContext()->supportsFeature(cv::ocl::Context::CL_DOUBLE))
{
return; // returns silently
}
for (int j = 0; j < LOOP_TIMES; j++)
{
random_roi();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment