Fix compilation error on systems without SuiteSparse installed

Issue was caused by declaring class PerThreadContext with some
members of choldmod-specific types. This class in only used from
an #ifndef CERES_NO_SUITESPARSE block and solved compilation error
by simply wrapping PerThreadContext with the same #ifndef block.

Change-Id: Icdc329073fcbd4a328e41ea8c0af0962e9c34ba8
This commit is contained in:
Sergey Sharybin
2013-06-19 21:04:02 +06:00
parent 6dd18563a1
commit 8b26cc7d35
+2
View File
@@ -54,6 +54,7 @@ namespace internal {
namespace {
// Per thread storage for SuiteSparse.
#ifndef CERES_NO_SUITESPARSE
struct PerThreadContext {
explicit PerThreadContext(int num_rows)
: solution(NULL),
@@ -79,6 +80,7 @@ struct PerThreadContext {
cholmod_dense* rhs;
SuiteSparse ss;
};
#endif
} // namespace