Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitri Naumov
ogs
Commits
f822b09c
Commit
f822b09c
authored
12 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
add definition for pthreads (HAVE_PTHREADS)
parent
5719eb36
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SimpleTests/MatrixTests/MatVecMultPthreads.cpp
+4
-4
4 additions, 4 deletions
SimpleTests/MatrixTests/MatVecMultPthreads.cpp
scripts/cmake/Find.cmake
+2
-1
2 additions, 1 deletion
scripts/cmake/Find.cmake
with
6 additions
and
5 deletions
SimpleTests/MatrixTests/MatVecMultPthreads.cpp
+
4
−
4
View file @
f822b09c
...
@@ -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
(
"
\t
Parameters read: n=%d, nnz=%d"
,
n
,
nnz
);
INFO
(
"
\t
Parameters 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
;
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/Find.cmake
+
2
−
1
View file @
f822b09c
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment