Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
SWIFT
SWIFTsim
Commits
4f61fdfb
Commit
4f61fdfb
authored
12 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
use omp tasks for kick1.
Former-commit-id: 18e63acdc3fecd2b87b1894cac6fef1338c5990a
parent
35ee49ce
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.c
+11
-1
11 additions, 1 deletion
src/engine.c
with
11 additions
and
1 deletion
src/engine.c
+
11
−
1
View file @
4f61fdfb
...
...
@@ -518,7 +518,12 @@ void engine_map_kick_first ( struct cell *c , void *data ) {
/* Loop over the remaining progeny. */
for
(
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
{
#pragma omp task
engine_map_kick_first
(
c
->
progeny
[
k
]
,
e
);
}
#pragma omp taskwait
for
(
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
{
dt_min
=
fminf
(
dt_min
,
c
->
progeny
[
k
]
->
dt_min
);
dt_max
=
fmaxf
(
dt_max
,
c
->
progeny
[
k
]
->
dt_max
);
h_max
=
fmaxf
(
h_max
,
c
->
progeny
[
k
]
->
h_max
);
...
...
@@ -725,7 +730,7 @@ void engine_step ( struct engine *e ) {
/* First kick. */
TIMER_TIC
// space_map_cells_post( e->s , 1 , &engine_map_kick_first , e );
k
=
0
;
/*
k = 0;
#pragma omp parallel shared(k,e)
{
int myk;
...
...
@@ -741,7 +746,12 @@ void engine_step ( struct engine *e ) {
else
break;
}
} */
for
(
k
=
0
;
k
<
e
->
s
->
nr_cells
;
k
++
)
{
#pragma omp task
engine_map_kick_first
(
&
e
->
s
->
cells
[
k
]
,
e
);
}
#pragma omp taskwait
TIMER_TOC
(
timer_kick1
);
// for(k=0; k<10; ++k)
...
...
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