Skip to content

Commit

Permalink
fix warnings about nk not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Dec 19, 2011
1 parent e787f2d commit daf4856
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/shogun/classifier/svm/SVMLight.cpp
Expand Up @@ -1680,11 +1680,10 @@ void CSVMLight::call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin)
int32_t num = kernel->get_num_vec_rhs();
int32_t num_kernels = kernel->get_num_subkernels() ;

int nk = (int) num_kernels; /* calling external lib */

float64_t suma=0;
float64_t* sumw=SG_MALLOC(float64_t, num_kernels);
#ifdef HAVE_LAPACK
int nk = (int) num_kernels; /* calling external lib */
double* alphay = SG_MALLOC(double, num);

for (int32_t i=0; i<num; i++)
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/regression/svr/SVRLight.cpp
Expand Up @@ -616,14 +616,14 @@ void CSVRLight::call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin,
{
int32_t num = totdoc;
int32_t num_kernels = kernel->get_num_subkernels() ;
int nk = (int) num_kernels; // calling external lib
float64_t sumalpha = 0;
float64_t* sumw=SG_MALLOC(float64_t, num_kernels);

for (int32_t i=0; i<num; i++)
sumalpha-=a[i]*(learn_parm->eps[i]-label[i]*c[i]);

#ifdef HAVE_LAPACK
int nk = (int) num_kernels; // calling external lib
double* alphay = SG_MALLOC(double, num);
for (int32_t i=0; i<num; i++)
alphay[i]=a[i]*label[i];
Expand Down

0 comments on commit daf4856

Please sign in to comment.