1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

dnn: fix tests build with disabled OpenCL

This commit is contained in:
Alexander Alekhin
2018-09-03 23:11:25 +00:00
parent aa5c45339c
commit 2cf34c0fe5
+4
View File
@@ -246,19 +246,23 @@ static testing::internal::ParamGenerator<tuple<Backend, Target> > dnnBackendsAnd
if (withHalide)
{
targets.push_back(make_tuple(DNN_BACKEND_HALIDE, DNN_TARGET_CPU));
#ifdef HAVE_OPENCL
if (cv::ocl::useOpenCL())
targets.push_back(make_tuple(DNN_BACKEND_HALIDE, DNN_TARGET_OPENCL));
#endif
}
#endif
#ifdef HAVE_INF_ENGINE
if (withInferenceEngine)
{
targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_CPU));
#ifdef HAVE_OPENCL
if (cv::ocl::useOpenCL())
{
targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL));
targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL_FP16));
}
#endif
if (checkMyriadTarget())
targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_MYRIAD));
}