Skip to content

Commit

Permalink
fixed compile error when lapack not installed for logdet constructor …
Browse files Browse the repository at this point in the history
…and its unit test
  • Loading branch information
SunilMahendrakar committed Mar 25, 2014
1 parent b493737 commit 7bff52b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Expand Up @@ -36,6 +36,7 @@ CLogDetEstimator::CLogDetEstimator()
init();
}

#ifdef HAVE_LAPACK
#ifdef HAVE_EIGEN3
CLogDetEstimator::CLogDetEstimator(SGSparseMatrix<float64_t> sparse_mat)
: CSGObject()
Expand Down Expand Up @@ -70,6 +71,7 @@ CLogDetEstimator::CLogDetEstimator(SGSparseMatrix<float64_t> sparse_mat)
m_trace_sampler->get_name());
}
#endif //HAVE_EIGEN3
#endif //HAVE_LAPACK

CLogDetEstimator::CLogDetEstimator(CTraceSampler* trace_sampler,
COperatorFunction<float64_t>* operator_log,
Expand Down
Expand Up @@ -46,7 +46,11 @@ class CLogDetEstimator : public CSGObject
*
* @param sparse_mat the input Sparse matrix
*/
#ifdef HAVE_EIGEN3
#ifdef HAVE_LAPACK
CLogDetEstimator(SGSparseMatrix<float64_t> sparse_mat);
#endif //HAVE_LAPACK
#endif //HAVE_EIGEN3

/**
* constructor
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/mathematics/linalg/LogDetEstimator_unittest.cc
Expand Up @@ -75,6 +75,7 @@ TEST(LogDetEstimator, sample)
SG_UNREF(e);
}

#ifdef HAVE_LAPACK
TEST(LogDetEstimator, Sparse_sample_constructor)
{
const index_t size=16;
Expand Down Expand Up @@ -105,6 +106,7 @@ TEST(LogDetEstimator, Sparse_sample_constructor)
SG_UNREF(op);
SG_UNREF(e);
}
#endif //HAVE_LAPACK
#endif // EIGEN_VERSION_AT_LEAST(3,1,0)

TEST(LogDetEstimator, sample_ratapp_dense)
Expand Down

0 comments on commit 7bff52b

Please sign in to comment.