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
d9fb8582
Commit
d9fb8582
authored
12 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
rely less on OpenMP.
Former-commit-id: a976ad9599ebd77cfcecdd12497ee580f92c9a4b
parent
6d5a0803
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/space.c
+14
-4
14 additions, 4 deletions
src/space.c
with
14 additions
and
4 deletions
src/space.c
+
14
−
4
View file @
d9fb8582
...
@@ -452,7 +452,7 @@ void space_rebuild ( struct space *s , double cell_max ) {
...
@@ -452,7 +452,7 @@ void space_rebuild ( struct space *s , double cell_max ) {
ih
[
0
]
=
s
->
ih
[
0
];
ih
[
1
]
=
s
->
ih
[
1
];
ih
[
2
]
=
s
->
ih
[
2
];
ih
[
0
]
=
s
->
ih
[
0
];
ih
[
1
]
=
s
->
ih
[
1
];
ih
[
2
]
=
s
->
ih
[
2
];
dim
[
0
]
=
s
->
dim
[
0
];
dim
[
1
]
=
s
->
dim
[
1
];
dim
[
2
]
=
s
->
dim
[
2
];
dim
[
0
]
=
s
->
dim
[
0
];
dim
[
1
]
=
s
->
dim
[
1
];
dim
[
2
]
=
s
->
dim
[
2
];
cdim
[
0
]
=
s
->
cdim
[
0
];
cdim
[
1
]
=
s
->
cdim
[
1
];
cdim
[
2
]
=
s
->
cdim
[
2
];
cdim
[
0
]
=
s
->
cdim
[
0
];
cdim
[
1
]
=
s
->
cdim
[
1
];
cdim
[
2
]
=
s
->
cdim
[
2
];
#pragma omp parallel for private(p,j)
//
#pragma omp parallel for private(p,j)
for
(
k
=
0
;
k
<
nr_parts
;
k
++
)
{
for
(
k
=
0
;
k
<
nr_parts
;
k
++
)
{
p
=
&
parts
[
k
];
p
=
&
parts
[
k
];
for
(
j
=
0
;
j
<
3
;
j
++
)
for
(
j
=
0
;
j
<
3
;
j
++
)
...
@@ -498,9 +498,19 @@ void space_rebuild ( struct space *s , double cell_max ) {
...
@@ -498,9 +498,19 @@ void space_rebuild ( struct space *s , double cell_max ) {
/* At this point, we have the upper-level cells, old or new. Now make
/* At this point, we have the upper-level cells, old or new. Now make
sure that the parts in each cell are ok. */
sure that the parts in each cell are ok. */
// tic = getticks();
// tic = getticks();
#pragma omp parallel for schedule(dynamic,1) shared(s)
k
=
0
;
for
(
k
=
0
;
k
<
s
->
nr_cells
;
k
++
)
#pragma omp parallel shared(s,k)
space_split
(
s
,
&
s
->
cells
[
k
]
);
{
while
(
1
)
{
int
myk
;
#pragma omp critical
myk
=
k
++
;
if
(
myk
<
s
->
nr_cells
)
space_split
(
s
,
&
s
->
cells
[
myk
]
);
else
break
;
}
}
// printf( "space_rebuild: space_rebuild_recurse took %.3f ms.\n" , (double)(getticks() - tic) / CPU_TPS * 1000 );
// printf( "space_rebuild: space_rebuild_recurse took %.3f ms.\n" , (double)(getticks() - tic) / CPU_TPS * 1000 );
/* Now that we have the cell structre, re-build the tasks. */
/* Now that we have the cell structre, re-build the tasks. */
...
...
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