disable SVM when AMD BLAS is not available
authorilya-lavrenov <ilya.lavrenov@itseez.com>
Fri, 11 Oct 2013 11:15:57 +0000 (15:15 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Fri, 11 Oct 2013 15:25:34 +0000 (19:25 +0400)
modules/ocl/src/svm.cpp
modules/ocl/test/test_ml.cpp

index 1cb341239e1fa4b750f35ad973c4790a5e85a977..ca81128ed7f9ec3143f81ec479d768c185d73c21 100644 (file)
@@ -686,6 +686,9 @@ float CvSVM_OCL::predict(const CvMat* samples, CV_OUT CvMat* results) const
     }
 
 #else
+    // TODO fix it
+    CV_Error(CV_StsNotImplemented, "This part of code contains mistakes. Install AMD BLAS in order to get a correct result or use CPU version of SVM");
+
     double degree1 = 0.0;
     if (params.kernel_type == CvSVM::POLY)
         degree1 = params.degree;
@@ -810,6 +813,9 @@ bool CvSVMSolver_ocl::solve_generic( CvSVMSolutionInfo& si )
     }
 
 #else
+    // TODO fix it
+    CV_Error(CV_StsNotImplemented, "This part of code contains mistakes. Install AMD BLAS in order to get a correct result or use CPU version of SVM");
+
     double degree1 = 0.0;
     if(params->kernel_type == CvSVM::POLY)
         degree1 = params->degree;
index 52d40bb11c1e3449e67f29f8a4ca083f5d8924a7..8fbb088b4c4c343626232c37e8a656cf28f47fc4 100644 (file)
@@ -126,6 +126,8 @@ OCL_TEST_P(KNN, Accuracy)
 INSTANTIATE_TEST_CASE_P(OCL_ML, KNN, Combine(Values(6, 5), Values(Size(200, 400), Size(300, 600)),
     Values(4, 3), Values(false, true)));
 
+#ifndef HAVE_CLAMDBLAS // TODO does not work non-blas version of SVM
+
 ////////////////////////////////SVM/////////////////////////////////////////////////
 
 PARAM_TEST_CASE(SVM_OCL, int, int, int)
@@ -306,4 +308,6 @@ INSTANTIATE_TEST_CASE_P(OCL_ML, SVM_OCL, testing::Combine(
                             Values(2, 3, 4)
                         ));
 
+#endif // HAVE_CLAMDBLAS
+
 #endif // HAVE_OPENCL