/[gentoo-x86]/sci-libs/libsvm/files/3.11-openmp.patch
Gentoo

Contents of /sci-libs/libsvm/files/3.11-openmp.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Dec 29 19:52:41 2011 UTC (5 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Version bump

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 bicatali 1.1 --- svm.cpp.orig 2011-05-27 04:32:19.000000000 +0100
2     +++ svm.cpp 2011-12-29 19:17:07.000000000 +0000
3     @@ -1281,6 +1281,9 @@
4     int start, j;
5     if((start = cache->get_data(i,&data,len)) < len)
6     {
7     +#ifdef OPENMP
8     +#pragma omp parallel for private(j)
9     +#endif
10     for(j=start;j<len;j++)
11     data[j] = (Qfloat)(y[i]*y[j]*(this->*kernel_function)(i,j));
12     }
13     @@ -2463,7 +2466,10 @@
14     model->param.svm_type == NU_SVR)
15     {
16     double *sv_coef = model->sv_coef[0];
17     - double sum = 0;
18     + double sum = 0; int i;
19     +#ifdef OPENMP
20     +#pragma omp parallel for private(i) reduction(+:sum)
21     +#endif
22     for(i=0;i<model->l;i++)
23     sum += sv_coef[i] * Kernel::k_function(x,model->SV[i],model->param);
24     sum -= model->rho[0];
25     @@ -2480,6 +2486,9 @@
26     int l = model->l;
27    
28     double *kvalue = Malloc(double,l);
29     +#ifdef OPENMP
30     +#pragma omp parallel for private(i)
31     +#endif
32     for(i=0;i<l;i++)
33     kvalue[i] = Kernel::k_function(x,model->SV[i],model->param);
34    

  ViewVC Help
Powered by ViewVC 1.1.20