Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
b3e9532a
Commit
b3e9532a
authored
Mar 05, 2016
by
Matthieu Schaller
Browse files
Code formatting
parent
27f8f56c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
b3e9532a
...
...
@@ -298,18 +298,18 @@ void runner_dosort(struct runner *r, struct cell *c, int flags, int clock) {
}
}
/* Verify the sorting. */
/* for ( j = 0 ; j < 13 ; j++ ) {
if ( !( flags & (1 << j) ) )
continue;
finger = &sort[ j*(count + 1) ];
for ( k = 1 ; k < count ; k++ ) {
if ( finger[k].d < finger[k-1].d )
error( "Sorting failed, ascending array." );
if ( finger[k].i >= count )
error( "Sorting failed, indices borked." );
}
} */
/* Verify the sorting. */
/* for ( j = 0 ; j < 13 ; j++ ) {
if ( !( flags & (1 << j) ) )
continue;
finger = &sort[ j*(count + 1) ];
for ( k = 1 ; k < count ; k++ ) {
if ( finger[k].d < finger[k-1].d )
error( "Sorting failed, ascending array." );
if ( finger[k].i >= count )
error( "Sorting failed, indices borked." );
}
} */
if
(
clock
)
TIMER_TOC
(
timer_dosort
);
}
...
...
@@ -443,18 +443,18 @@ void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) {
}
}
/* Verify the sorting. */
/* for ( j = 0 ; j < 13 ; j++ ) {
if ( !( flags & (1 << j) ) )
continue;
finger = &c->gsort[ j*(count + 1) ];
for ( k = 1 ; k < count ; k++ ) {
if ( finger[k].d < finger[k-1].d )
error( "Sorting failed, ascending array." );
if ( finger[k].i < 0 || finger[k].i >= count )
error( "Sorting failed, indices borked." );
}
} */
/* Verify the sorting. */
/* for ( j = 0 ; j < 13 ; j++ ) {
if ( !( flags & (1 << j) ) )
continue;
finger = &c->gsort[ j*(count + 1) ];
for ( k = 1 ; k < count ; k++ ) {
if ( finger[k].d < finger[k-1].d )
error( "Sorting failed, ascending array." );
if ( finger[k].i < 0 || finger[k].i >= count )
error( "Sorting failed, indices borked." );
}
} */
if
(
clock
)
TIMER_TOC
(
timer_dosort
);
}
...
...
src/scheduler.c
View file @
b3e9532a
...
...
@@ -937,7 +937,7 @@ void scheduler_reweight(struct scheduler *s) {
if
(
t
->
type
==
task_type_recv
)
t
->
weight
*=
1
.
41
;
}
// message( "weighting tasks took %.3f %s." ,
//clocks_from_ticks( getticks() - tic ), clocks_getunit());
//
clocks_from_ticks( getticks() - tic ), clocks_getunit());
/* int min = tasks[0].weight, max = tasks[0].weight;
for ( k = 1 ; k < nr_tasks ; k++ )
...
...
@@ -974,7 +974,7 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
s
->
tasks
[
k
].
rid
=
-
1
;
}
// message( "waiting tasks took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit() );
//
clocks_from_ticks(getticks() - tic), clocks_getunit() );
/* Enqueue a set of extraenous tasks to set the task waits. */
struct
task
*
rewait_tasks
=
&
s
->
tasks
[
s
->
nr_tasks
];
...
...
@@ -1034,7 +1034,7 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
}
// message( "enqueueing tasks took %.3f %s." ,
//clocks_from_ticks( getticks() - tic ), clocks_getunit());
//
clocks_from_ticks( getticks() - tic ), clocks_getunit());
}
/**
...
...
src/space.c
View file @
b3e9532a
...
...
@@ -343,8 +343,8 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
cell_getid
(
cdim
,
p
->
x
[
0
]
*
ih
[
0
],
p
->
x
[
1
]
*
ih
[
1
],
p
->
x
[
2
]
*
ih
[
2
]);
cells
[
ind
[
k
]].
count
++
;
}
// message( "getting particle indices took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit()):
// message( "getting particle indices took %.3f %s." ,
//
clocks_from_ticks(getticks() - tic), clocks_getunit()):
#ifdef WITH_MPI
/* Move non-local parts to the end of the list. */
...
...
@@ -397,7 +397,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
// tic = getticks();
space_parts_sort
(
s
,
ind
,
nr_parts
,
0
,
s
->
nr_cells
-
1
);
// message( "parts_sort took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit());
//
clocks_from_ticks(getticks() - tic), clocks_getunit());
/* Re-link the gparts. */
for
(
k
=
0
;
k
<
nr_parts
;
k
++
)
...
...
@@ -432,7 +432,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
cells
[
ind
[
k
]].
gcount
++
;
}
// message( "getting particle indices took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit());
//
clocks_from_ticks(getticks() - tic), clocks_getunit());
/* TODO: Here we should exchange the gparts as well! */
...
...
@@ -440,7 +440,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
// tic = getticks();
gparts_sort
(
s
->
gparts
,
ind
,
nr_gparts
,
0
,
s
->
nr_cells
-
1
);
// message( "gparts_sort took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit());
//
clocks_from_ticks(getticks() - tic), clocks_getunit());
/* Re-link the parts. */
for
(
k
=
0
;
k
<
nr_gparts
;
k
++
)
...
...
@@ -464,7 +464,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
gfinger
=
&
gfinger
[
c
->
gcount
];
}
// message( "hooking up cells took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit());
//
clocks_from_ticks(getticks() - tic), clocks_getunit());
/* At this point, we have the upper-level cells, old or new. Now make
sure that the parts in each cell are ok. */
...
...
@@ -476,7 +476,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
engine_launch
(
s
->
e
,
s
->
e
->
nr_threads
,
1
<<
task_type_split_cell
,
0
);
// message( "space_split took %.3f %s." ,
//clocks_from_ticks(getticks() - tic), clocks_getunit());
//
clocks_from_ticks(getticks() - tic), clocks_getunit());
}
/**
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment