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
867ffdff
Commit
867ffdff
authored
Sep 23, 2017
by
Alejandro E. Rendon
Browse files
Time in sequential operation
parent
b56c9434
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
867ffdff
*.out
\ No newline at end of file
a.out
deleted
100755 → 0
View file @
b56c9434
File deleted
vec_add.cpp
View file @
867ffdff
#include <iostream>
#include <string>
#include <omp.h>
using
namespace
std
;
...
...
@@ -35,12 +36,15 @@ int main(int argc, char const *argv[]) {
fillVec
(
a
,
vec_size
,
10
);
fillVec
(
b
,
vec_size
,
10
);
print
(
"a = "
,
a
,
vec_size
);
print
(
"b = "
,
b
,
vec_size
);
//
print("a = ", a, vec_size);
//
print("b = ", b, vec_size);
double
begin
=
omp_get_wtime
();
add
(
a
,
b
,
c
,
vec_size
);
double
end
=
omp_get_wtime
();
cout
<<
end
-
begin
<<
endl
;
print
(
"c = "
,
c
,
vec_size
);
//
print("c = ", c, vec_size);
free
(
a
);
free
(
b
);
...
...
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