Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HPC
hello-world
Commits
d5d625b9
Commit
d5d625b9
authored
Sep 23, 2017
by
Alejandro E. Rendon
Browse files
Testing Threads
parent
6a6c107a
Changes
2
Hide whitespace changes
Inline
Side-by-side
OpenMP/omp.cpp
0 → 100644
View file @
d5d625b9
#include <iostream>
#include <string>
#include <omp.h>
using
namespace
std
;
int
main
()
{
int
iam
,
nt
;
#pragma omp parallel default(shared) private(iam,nt)
{
iam
=
omp_get_thread_num
();
nt
=
omp_get_num_threads
();
string
out
=
"I'm Thread -> "
+
to_string
(
iam
)
+
"/"
+
to_string
(
nt
)
+
" "
;
cout
<<
out
<<
endl
;
}
return
0
;
}
\ No newline at end of file
vec_add.cpp
→
OpenMP/
vec_add.cpp
View file @
d5d625b9
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment