This commit is contained in:
Jitse Niesen 2010-04-12 18:55:27 +01:00
commit 614fbe497d
4 changed files with 45 additions and 30 deletions

View File

@ -152,11 +152,24 @@ option(EIGEN_TEST_C++0x "Enables all C++0x features." OFF)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
# the user modifiable install path for header files
set(EIGEN_INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR} CACHE PATH "The directory where we install the header files (optional)")
# set the internal install path for header files which depends on wether the user modifiable
# EIGEN_INCLUDE_INSTALL_DIR has been set by the user or not.
if(EIGEN_INCLUDE_INSTALL_DIR)
set(INCLUDE_INSTALL_DIR
${EIGEN_INCLUDE_INSTALL_DIR}
CACHE INTERNAL
"The directory where we install the header files (internal)"
)
else()
set(INCLUDE_INSTALL_DIR set(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_PREFIX}/include/eigen3" "${CMAKE_INSTALL_PREFIX}/include/eigen3"
CACHE PATH CACHE INTERNAL
"The directory where we install the header files" "The directory where we install the header files (internal)"
) )
endif()
install(FILES install(FILES
signature_of_eigen3_matrix_library signature_of_eigen3_matrix_library
@ -213,6 +226,8 @@ if(cmake_generator_tolower MATCHES "makefile")
message("--------------+----------------------------------------------------------------") message("--------------+----------------------------------------------------------------")
message("make install | Install to ${CMAKE_INSTALL_PREFIX}") message("make install | Install to ${CMAKE_INSTALL_PREFIX}")
message(" | To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath") message(" | To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
message(" | Header files are installed to ${INCLUDE_INSTALL_DIR}")
message(" | To change that: cmake . -DEIGEN_INCLUDE_INSTALL_DIR=yourpath")
message("make doc | Generate the API documentation, requires Doxygen & LaTeX") message("make doc | Generate the API documentation, requires Doxygen & LaTeX")
message("make check | Build and run the unit-tests. Read this page:") message("make check | Build and run the unit-tests. Read this page:")
message(" | http://eigen.tuxfamily.org/index.php?title=Tests") message(" | http://eigen.tuxfamily.org/index.php?title=Tests")

View File

@ -84,7 +84,7 @@ cholmod_sparse SparseMatrixBase<Derived>::asCholmodMatrix()
res.stype = 0; res.stype = 0;
} }
else else
res.stype = 0; res.stype = -1; // by default we consider the lower part
return res; return res;
} }
@ -177,21 +177,21 @@ void SparseLLT<MatrixType,Cholmod>::compute(const MatrixType& a)
} }
cholmod_sparse A = const_cast<MatrixType&>(a).asCholmodMatrix(); cholmod_sparse A = const_cast<MatrixType&>(a).asCholmodMatrix();
m_cholmod.supernodal = CHOLMOD_AUTO; // m_cholmod.supernodal = CHOLMOD_AUTO;
// TODO // TODO
if (m_flags&IncompleteFactorization) // if (m_flags&IncompleteFactorization)
{ // {
m_cholmod.nmethods = 1; // m_cholmod.nmethods = 1;
m_cholmod.method[0].ordering = CHOLMOD_NATURAL; // m_cholmod.method[0].ordering = CHOLMOD_NATURAL;
m_cholmod.postorder = 0; // m_cholmod.postorder = 0;
} // }
else // else
{ // {
m_cholmod.nmethods = 1; // m_cholmod.nmethods = 1;
m_cholmod.method[0].ordering = CHOLMOD_NATURAL; // m_cholmod.method[0].ordering = CHOLMOD_NATURAL;
m_cholmod.postorder = 0; // m_cholmod.postorder = 0;
} // }
m_cholmod.final_ll = 1; // m_cholmod.final_ll = 1;
m_cholmodFactor = cholmod_analyze(&A, &m_cholmod); m_cholmodFactor = cholmod_analyze(&A, &m_cholmod);
cholmod_factorize(&A, m_cholmodFactor, &m_cholmod); cholmod_factorize(&A, m_cholmodFactor, &m_cholmod);

View File

@ -4,9 +4,9 @@ add_custom_target(blas)
set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp) set(EigenBlas_SRCS single.cpp double.cpp complex_single.cpp complex_double.cpp xerbla.cpp)
add_library(eigen_blas ${EigenBlas_SRCS}) add_library(eigen_blas_static ${EigenBlas_SRCS})
# add_library(eigen_blas SHARED ${EigenBlas_SRCS}) add_library(eigen_blas SHARED ${EigenBlas_SRCS})
add_dependencies(blas eigen_blas) add_dependencies(blas eigen_blas eigen_blas_static)
install(TARGETS eigen_blas install(TARGETS eigen_blas
RUNTIME DESTINATION bin RUNTIME DESTINATION bin

View File

@ -27,7 +27,7 @@
int EIGEN_BLAS_FUNC(gemm)(char *opa, char *opb, int *m, int *n, int *k, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *pb, int *ldb, RealScalar *pbeta, RealScalar *pc, int *ldc) int EIGEN_BLAS_FUNC(gemm)(char *opa, char *opb, int *m, int *n, int *k, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *pb, int *ldb, RealScalar *pbeta, RealScalar *pc, int *ldc)
{ {
// std::cerr << "in gemm " << *opa << " " << *opb << " " << *m << " " << *n << " " << *k << " " << *lda << " " << *ldb << " " << *ldc << " " << *palpha << " " << *pbeta << "\n"; // std::cerr << "in gemm " << *opa << " " << *opb << " " << *m << " " << *n << " " << *k << " " << *lda << " " << *ldb << " " << *ldc << " " << *palpha << " " << *pbeta << "\n";
typedef void (*functype)(int, int, int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar); typedef void (*functype)(int, int, int, const Scalar *, int, const Scalar *, int, Scalar *, int, Scalar, Eigen::GemmParallelInfo<Scalar>*);
static functype func[12]; static functype func[12];
static bool init = false; static bool init = false;
@ -67,7 +67,7 @@ int EIGEN_BLAS_FUNC(gemm)(char *opa, char *opb, int *m, int *n, int *k, RealScal
else else
matrix(c, *m, *n, *ldc) *= beta; matrix(c, *m, *n, *ldc) *= beta;
func[code](*m, *n, *k, a, *lda, b, *ldb, c, *ldc, alpha); func[code](*m, *n, *k, a, *lda, b, *ldb, c, *ldc, alpha, 0);
return 0; return 0;
} }