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
bc99ec0a
Commit
bc99ec0a
authored
9 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
forgot to check if any of the two tasks are NULL.
parent
dd81b742
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!136
Master
,
!75
Overlapping tasks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/task.c
+6
-5
6 additions, 5 deletions
src/task.c
with
6 additions
and
5 deletions
src/task.c
+
6
−
5
View file @
bc99ec0a
...
@@ -50,7 +50,7 @@ const char *taskID_names[task_type_count] = {
...
@@ -50,7 +50,7 @@ const char *taskID_names[task_type_count] = {
/**
/**
* @brief Computes the overlap between the parts array of two given cells.
* @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
)
{
size_t
task_cell_overlap
(
const
struct
cell
*
ci
,
const
struct
cell
*
cj
)
{
if
(
ci
==
NULL
||
cj
==
NULL
)
return
0
;
if
(
ci
==
NULL
||
cj
==
NULL
)
return
0
;
if
(
ci
->
parts
<=
cj
->
parts
&&
if
(
ci
->
parts
<=
cj
->
parts
&&
...
@@ -74,10 +74,11 @@ size_t task_cell_overlap(const struct cell *ci, const struct cell *cj) {
...
@@ -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
)
{
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
/* First check if any of the two tasks are of a type that don't
use cells. */
use cells. */
if
(
ta
->
type
==
task_type_none
||
ta
->
type
==
task_type_psort
||
if
(
ta
==
NULL
||
tb
==
NULL
||
ta
->
type
==
task_type_none
||
ta
->
type
==
task_type_split_cell
||
ta
->
type
==
task_type_rewait
||
ta
->
type
==
task_type_psort
||
ta
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_none
||
tb
->
type
==
task_type_psort
||
ta
->
type
==
task_type_rewait
||
tb
->
type
==
task_type_none
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_rewait
)
tb
->
type
==
task_type_psort
||
tb
->
type
==
task_type_split_cell
||
tb
->
type
==
task_type_rewait
)
return
0
.
0
f
;
return
0
.
0
f
;
/* Compute the union of the cell data. */
/* Compute the union of the cell data. */
...
...
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