Skip to content

Commit

Permalink
Hopefully fixed strange memory bug in CGaussianProcessRegression::Get…
Browse files Browse the repository at this point in the history
…CovarianceMatrix
  • Loading branch information
Jacob Walker authored and puffin444 committed Apr 12, 2012
1 parent 6f128a5 commit b98500e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/shogun/regression/GaussianProcessRegression.cpp
Expand Up @@ -218,14 +218,11 @@ SGMatrix<float64_t> CGaussianProcessRegression::getCovarianceMatrix(CFeatures* d
//Indices used to solve Lv=K(X_test, X_train) for v
SGVector< int32_t > ipiv(CMath::min(m_L.num_rows, m_L.num_cols));

int info;


memcpy(temp1.matrix, kernel_test_matrix.matrix,
kernel_test_matrix.num_cols*kernel_test_matrix.num_rows*sizeof(float64_t));

//Get indices used to solve Lv=K(X_test, X_train) for v
dgetrf_(&m_L.num_rows, &m_L.num_cols, m_L.matrix, &m_L.num_cols, ipiv.vector, &info);
clapack_dgetrf(CblasColMajor, m_L.num_rows, m_L.num_cols, m_L.matrix, m_L.num_cols, ipiv.vector);

//Solve Lv=K(X_test, X_train) for v
clapack_dgetrs(CblasColMajor, CblasNoTrans,
Expand Down

0 comments on commit b98500e

Please sign in to comment.