fix casting from double* to void* in SuperLU and Cholmod support

This commit is contained in:
Gael Guennebaud 2013-06-24 17:24:32 +02:00
parent ee8a28fb85
commit 4cc9377941
2 changed files with 6 additions and 5 deletions

View File

@ -126,7 +126,7 @@ cholmod_dense viewAsCholmod(MatrixBase<Derived>& mat)
res.ncol = mat.cols();
res.nzmax = res.nrow * res.ncol;
res.d = Derived::IsVectorAtCompileTime ? mat.derived().size() : mat.derived().outerStride();
res.x = mat.derived().data();
res.x = (void*)(mat.derived().data());
res.z = 0;
internal::cholmod_configure_matrix<Scalar>(res);
@ -295,7 +295,8 @@ class CholmodBase : internal::noncopyable
eigen_assert(size==b.rows());
// note: cd stands for Cholmod Dense
cholmod_dense b_cd = viewAsCholmod(b.const_cast_derived());
Rhs& b_ref(b.const_cast_derived());
cholmod_dense b_cd = viewAsCholmod(b_ref);
cholmod_dense* x_cd = cholmod_solve(CHOLMOD_A, m_cholmodFactor, &b_cd, &m_cholmod);
if(!x_cd)
{
@ -345,7 +346,7 @@ class CholmodBase : internal::noncopyable
}
template<typename Stream>
void dumpMemory(Stream& s)
void dumpMemory(Stream& /*s*/)
{}
protected:

View File

@ -160,7 +160,7 @@ struct SluMatrix : SuperMatrix
res.ncol = mat.cols();
res.storage.lda = MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride();
res.storage.values = mat.data();
res.storage.values = (void*)(mat.data());
return res;
}
@ -377,7 +377,7 @@ class SuperLUBase : internal::noncopyable
}
template<typename Stream>
void dumpMemory(Stream& s)
void dumpMemory(Stream& /*s*/)
{}
protected: