Skip to content
Snippets Groups Projects
Commit f822b09c authored by Tom Fischer's avatar Tom Fischer
Browse files

add definition for pthreads (HAVE_PTHREADS)

parent 5719eb36
No related branches found
No related tags found
No related merge requests found
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include "BuildInfo.h" #include "BuildInfo.h"
#endif #endif
#ifdef _OPENMP #ifdef HAVE_PTHREADS
#include <omp.h> #include <pthread.h>
#endif #endif
/** /**
...@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) ...@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
unsigned nnz(iA[n]); unsigned nnz(iA[n]);
INFO("\tParameters read: n=%d, nnz=%d", n, nnz); INFO("\tParameters read: n=%d, nnz=%d", n, nnz);
//#ifdef HAVE_PTHREADS #ifdef HAVE_PTHREADS
unsigned n_threads(n_cores_arg.getValue()); unsigned n_threads(n_cores_arg.getValue());
MathLib::CRSMatrixPThreads<double> mat (n, iA, jA, A, n_threads); MathLib::CRSMatrixPThreads<double> mat (n, iA, jA, A, n_threads);
...@@ -156,7 +156,7 @@ int main(int argc, char *argv[]) ...@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
delete [] x; delete [] x;
delete [] y; delete [] y;
//#endif #endif
delete custom_format; delete custom_format;
delete logogCout; delete logogCout;
......
...@@ -51,10 +51,11 @@ SET ( CMAKE_THREAD_PREFER_PTHREAD ON ) ...@@ -51,10 +51,11 @@ SET ( CMAKE_THREAD_PREFER_PTHREAD ON )
FIND_PACKAGE ( Threads ) FIND_PACKAGE ( Threads )
IF ( CMAKE_USE_PTHREADS_INIT ) IF ( CMAKE_USE_PTHREADS_INIT )
SET (HAVE_PTHREADS TRUE) SET (HAVE_PTHREADS TRUE)
ADD_DEFINITIONS(-DHAVE_PTHREADS)
ENDIF (CMAKE_USE_PTHREADS_INIT ) ENDIF (CMAKE_USE_PTHREADS_INIT )
# blas # blas
FIND_PACKAGE ( BLAS ) FIND_PACKAGE ( BLAS )
# lapack # lapack
FIND_PACKAGE ( LAPACK ) FIND_PACKAGE ( LAPACK )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment