Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QuickSched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
QuickSched
Commits
ca806672
Commit
ca806672
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
dump task counts.
parent
2ccc56bc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/test_bh.c
+20
-3
20 additions, 3 deletions
examples/test_bh.c
with
20 additions
and
3 deletions
examples/test_bh.c
+
20
−
3
View file @
ca806672
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
/* Some local constants. */
/* Some local constants. */
#define cell_pool_grow 100
#define cell_pool_grow 100
#define cell_maxparts 100
#define cell_maxparts 100
#define task_limit
4
000
#define task_limit
5
000
#define const_G 6.6738e-11
#define const_G 6.6738e-11
#define dist_min 0.5
#define dist_min 0.5
...
@@ -66,10 +66,11 @@ struct cell {
...
@@ -66,10 +66,11 @@ struct cell {
/** Task types. */
/** Task types. */
enum
task_type
{
enum
task_type
{
task_type_self
,
task_type_self
=
0
,
task_type_pair
,
task_type_pair
,
task_type_pair_pc
,
task_type_pair_pc
,
task_type_com
task_type_com
,
task_type_count
};
};
...
@@ -677,6 +678,22 @@ void test_bh ( int N , int nr_threads , int runs ) {
...
@@ -677,6 +678,22 @@ void test_bh ( int N , int nr_threads , int runs ) {
create_tasks
(
&
s
,
root
,
NULL
);
create_tasks
(
&
s
,
root
,
NULL
);
tot_setup
+=
getticks
()
-
tic
;
tot_setup
+=
getticks
()
-
tic
;
/* Dump the number of tasks. */
message
(
"total nr of tasks: %i."
,
s
.
count
);
message
(
"total nr of deps: %i."
,
s
.
count_deps
);
message
(
"total nr of res: %i."
,
s
.
count_res
);
message
(
"total nr of locks: %i."
,
s
.
count_locks
);
message
(
"total nr of uses: %i."
,
s
.
count_uses
);
int
counts
[
task_type_count
];
for
(
k
=
0
;
k
<
task_type_count
;
k
++
)
counts
[
k
]
=
0
;
for
(
k
=
0
;
k
<
s
.
count
;
k
++
)
counts
[
s
.
tasks
[
k
].
type
]
+=
1
;
printf
(
"task counts: [ "
);
for
(
k
=
0
;
k
<
task_type_count
;
k
++
)
printf
(
"%i "
,
counts
[
k
]
);
printf
(
"].
\n
"
);
/* Loop over the number of runs. */
/* Loop over the number of runs. */
for
(
k
=
0
;
k
<
runs
;
k
++
)
{
for
(
k
=
0
;
k
<
runs
;
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