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
bc99ec0a
Commit
bc99ec0a
authored
Jan 11, 2016
by
Pedro Gonnet
Browse files
forgot to check if any of the two tasks are NULL.
parent
dd81b742
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
bc99ec0a
...
...
@@ -50,7 +50,7 @@ const char *taskID_names[task_type_count] = {
/**
* @brief Computes the overlap between the parts array of two given cells.
*/
size_t
task_cell_overlap
(
const
struct
cell
*
ci
,
const
struct
cell
*
cj
)
{
if
(
ci
==
NULL
||
cj
==
NULL
)
return
0
;
if
(
ci
->
parts
<=
cj
->
parts
&&
...
...
@@ -74,10 +74,11 @@ size_t task_cell_overlap(const struct cell *ci, const struct cell *cj) {
float
task_overlap
(
const
struct
task
*
ta
,
const
struct
task
*
tb
)
{
/* First check if any of the two tasks are of a type that don't
use cells. */
if
(
ta
->
type
==
task_type_none
||
ta
->
type
==
task_type_psort
||
ta
->
type
==
task_type_split_cell
||
ta
->
type
==
task_type_rewait
||
tb
->
type
==
task_type_none
||
tb
->
type
==
task_type_psort
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_rewait
)
if
(
ta
==
NULL
||
tb
==
NULL
||
ta
->
type
==
task_type_none
||
ta
->
type
==
task_type_psort
||
ta
->
type
==
task_type_split_cell
||
ta
->
type
==
task_type_rewait
||
tb
->
type
==
task_type_none
||
tb
->
type
==
task_type_psort
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_rewait
)
return
0
.
0
f
;
/* Compute the union of the cell data. */
...
...
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