diff --git a/BaseCode/Makefile b/BaseCode/Makefile index 13bdab2..8b04377 100644 --- a/BaseCode/Makefile +++ b/BaseCode/Makefile @@ -2,19 +2,19 @@ # Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform) -# Mac OS X -DDG_INCLUDE_PATH = -DDG_LIBRARY_PATH = -DDG_BLAS_LIBS = -framework Accelerate -DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig -DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT - -# # Linux +# # Mac OS X # DDG_INCLUDE_PATH = # DDG_LIBRARY_PATH = -# DDG_BLAS_LIBS = -llapack -lblas -lgfortran -# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm -# DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 +# DDG_BLAS_LIBS = -framework Accelerate +# DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig +# DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT + +# Linux +DDG_INCLUDE_PATH = +DDG_LIBRARY_PATH = +DDG_BLAS_LIBS = -llapack -lblas -lgfortran -lumfpack +DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -lm +DDG_OPENGL_LIBS = -lglut -lGL -lGLU -lX11 # # Windows / Cygwin # DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse @@ -28,7 +28,7 @@ DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT TARGET = ddg CC = g++ LD = g++ -CFLAGS = -O3 -Wall -Werror -ansi -pedantic $(DDG_INCLUDE_PATH) -I./include -I./src +CFLAGS = -O3 -Wall -Werror -ansi -pedantic $(DDG_INCLUDE_PATH) -I./include -I./src -DGL_GLEXT_PROTOTYPES LFLAGS = -O3 -Wall -Werror -ansi -pedantic $(DDG_LIBRARY_PATH) LIBS = $(DDG_OPENGL_LIBS) $(DDG_SUITESPARSE_LIBS) $(DDG_BLAS_LIBS) diff --git a/BaseCode/include/DenseMatrix.h b/BaseCode/include/DenseMatrix.h index 4932907..db7fe9b 100644 --- a/BaseCode/include/DenseMatrix.h +++ b/BaseCode/include/DenseMatrix.h @@ -30,6 +30,7 @@ #ifndef DDG_DENSEMATRIX_H #define DDG_DENSEMATRIX_H +#include #include #include "Types.h" diff --git a/BaseCode/include/SparseMatrix.h b/BaseCode/include/SparseMatrix.h index 7530d40b..05b6139 100644 --- a/BaseCode/include/SparseMatrix.h +++ b/BaseCode/include/SparseMatrix.h @@ -34,6 +34,7 @@ #ifndef DDG_SPARSE_MATRIX_H #define DDG_SPARSE_MATRIX_H +#include #include #include #include diff --git a/BaseCode/src/SparseMatrix.cpp b/BaseCode/src/SparseMatrix.cpp index 61d2358..005afaa 100644 --- a/BaseCode/src/SparseMatrix.cpp +++ b/BaseCode/src/SparseMatrix.cpp @@ -19,8 +19,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -54,8 +54,8 @@ namespace DDG resize( m, n ); double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; // iterate over columns for( int col = 0; col < n; col++ ) @@ -199,8 +199,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric; diff --git a/BaseCode/src/SparseMatrix.inl b/BaseCode/src/SparseMatrix.inl index 307fc85..4b1cb96 100644 --- a/BaseCode/src/SparseMatrix.inl +++ b/BaseCode/src/SparseMatrix.inl @@ -391,8 +391,8 @@ namespace DDG // build compressed matrix (note that EntryMap stores entries in column-major order) double* pr = (double*) cData->x; - UF_long* ir = (UF_long*) cData->i; - UF_long* jc = (UF_long*) cData->p; + SuiteSparse_long* ir = (SuiteSparse_long*) cData->i; + SuiteSparse_long* jc = (SuiteSparse_long*) cData->p; int i = 0; int j = -1; for( const_iterator e = begin(); @@ -499,8 +499,8 @@ namespace DDG int t0 = clock(); cholmod_sparse* Ac = A.to_cholmod(); int n = Ac->nrow; - UF_long* Ap = (UF_long*) Ac->p; - UF_long* Ai = (UF_long*) Ac->i; + SuiteSparse_long* Ap = (SuiteSparse_long*) Ac->p; + SuiteSparse_long* Ai = (SuiteSparse_long*) Ac->i; double* Ax = (double*) Ac->x; void* Symbolic; void* Numeric;