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
0f94a9bd
Commit
0f94a9bd
authored
Nov 15, 2017
by
Peter W. Draper
Browse files
Fix up commenting
parent
65ddfa3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/plot_task_dependencies.sh
View file @
0f94a9bd
#!/bin/bash
# Check that the required file is present
if
[
!
-e
dependency_graph.dot
]
then
echo
"Missing task-graph output! Can generate figure."
# Creates a graphic from the task graph file dependency_graph.dot.
# Requires the graphviz command "dot".
if
[
!
-e
dependency_graph.dot
]
;
then
echo
"Missing task-graph output 'dependency_graph.dot'! Cannot generate figure."
else
dot
-Tpng
dependency_graph.dot
-o
task_graph.png
echo
"Output written to task_graph.png"
fi
exit
src/scheduler.c
View file @
0f94a9bd
...
...
@@ -128,7 +128,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Conservative number of dependencies per task type */
const
int
max_nber_dep
=
128
;
/* Number of possib
b
le relations between tasks */
/* Number of possible relations between tasks */
const
int
nber_relation
=
2
*
task_type_count
*
task_subtype_count
*
max_nber_dep
;
...
...
@@ -146,7 +146,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Create file */
char
filename
[
200
]
=
"dependency_graph.dot"
;
FILE
*
f
=
fopen
(
filename
,
"w"
);
if
(
f
==
NULL
)
error
(
"Error opening depenency graph file."
);
if
(
f
==
NULL
)
error
(
"Error opening depen
d
ency graph file."
);
/* Write header */
fprintf
(
f
,
"digraph task_dep {
\n
"
);
...
...
@@ -159,7 +159,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
for
(
int
i
=
0
;
i
<
s
->
nr_tasks
;
i
++
)
{
const
struct
task
*
ta
=
&
s
->
tasks
[
i
];
/* and their
s
dependencies */
/* and their dependencies */
for
(
int
j
=
0
;
j
<
ta
->
nr_unlock_tasks
;
j
++
)
{
const
struct
task
*
tb
=
ta
->
unlock_tasks
[
j
];
...
...
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