Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
exercise
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ahuegli
exercise
Commits
34cd8a29
Commit
34cd8a29
authored
Apr 05, 2020
by
ahuegli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixing
parent
7d78fc2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
hw3/skeleton/wave.cpp
hw3/skeleton/wave.cpp
+3
-4
No files found.
hw3/skeleton/wave.cpp
View file @
34cd8a29
...
...
@@ -329,12 +329,11 @@ void WaveEquation::run(double t_end) {
int i1_max = N;
int i2_max = N;*/
int
tid
=
omp_get_thread_num
();
int
ti0
,
ti1
,
ti2
;
thread_coordinates
(
tid
,
threads_per_dim
,
ti0
,
ti1
,
ti2
);
int
nloc
=
N
/
threads_per_dim
;
int
i0_min
=
ti0
*
nloc
;
int
i1_min
=
ti1
*
nloc
;
int
i2_min
=
ti2
*
nloc
;
...
...
@@ -383,7 +382,7 @@ void WaveEquation::run(double t_end) {
// ********************************************************************************
// Question 3: You will need to add the following barrier (why?)
// ********************************************************************************
//
#pragma omp barrier
#pragma omp barrier
std
::
swap
(
u_new
,
u
);
std
::
swap
(
u_new
,
u_old
);
...
...
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