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
e15891f8
Commit
e15891f8
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Pack the task types and re-arrange the task structure to go from 80 bytes to 64 bytes.
parent
e59ef25b
No related branches found
No related tags found
1 merge request
!238
Pack the task types and re-arrange the task structure to go from 80 bytes to 64 bytes.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/task.h
+18
-18
18 additions, 18 deletions
src/task.h
with
18 additions
and
18 deletions
src/task.h
+
18
−
18
View file @
e15891f8
...
@@ -52,7 +52,7 @@ enum task_types {
...
@@ -52,7 +52,7 @@ enum task_types {
task_type_grav_up
,
task_type_grav_up
,
task_type_grav_external
,
task_type_grav_external
,
task_type_count
task_type_count
};
}
__attribute__
((
packed
))
;
/**
/**
* @brief The different task sub-types (for pairs, selfs and sub-tasks).
* @brief The different task sub-types (for pairs, selfs and sub-tasks).
...
@@ -65,7 +65,7 @@ enum task_subtypes {
...
@@ -65,7 +65,7 @@ enum task_subtypes {
task_subtype_grav
,
task_subtype_grav
,
task_subtype_tend
,
task_subtype_tend
,
task_subtype_count
task_subtype_count
};
}
__attribute__
((
packed
))
;
/**
/**
* @brief The type of particles/objects this task acts upon in a given cell.
* @brief The type of particles/objects this task acts upon in a given cell.
...
@@ -94,35 +94,32 @@ extern const char *subtaskID_names[];
...
@@ -94,35 +94,32 @@ extern const char *subtaskID_names[];
*/
*/
struct
task
{
struct
task
{
/*!
Type of the task
*/
/*!
Pointers to the cells this task acts upon
*/
enum
task_types
type
;
struct
cell
*
ci
,
*
cj
;
/*! Sub-type of the task (for the tasks that have one */
/*! List of tasks unlocked by this one */
enum
task_subtypes
subtype
;
struct
task
**
unlock_tasks
;
/*! Start and end time of this task */
ticks
tic
,
toc
;
/*! Flags used to carry additional information (e.g. sort directions) */
/*! Flags used to carry additional information (e.g. sort directions) */
int
flags
;
int
flags
;
/*! Number of unsatisfied dependencies */
int
wait
;
/*! Rank of a task in the order */
/*! Rank of a task in the order */
int
rank
;
int
rank
;
/*! Weight of the task */
/*! Weight of the task */
int
weight
;
int
weight
;
/*! Pointers to the cells this task acts upon */
struct
cell
*
ci
,
*
cj
;
/*! ID of the queue or runner owning this task */
/*! ID of the queue or runner owning this task */
int
rid
;
short
int
rid
;
/*! Number of tasks unlocked by this one */
/*! Number of tasks unlocked by this one */
int
nr_unlock_tasks
;
short
int
nr_unlock_tasks
;
/*!
List of tasks unlocked by this one
*/
/*!
Number of unsatisfied dependencies
*/
s
truct
task
**
unlock_tasks
;
s
hort
int
wait
;
#ifdef WITH_MPI
#ifdef WITH_MPI
...
@@ -134,8 +131,11 @@ struct task {
...
@@ -134,8 +131,11 @@ struct task {
#endif
#endif
/*! Start and end time of this task */
/*! Type of the task */
ticks
tic
,
toc
;
enum
task_types
type
;
/*! Sub-type of the task (for the tasks that have one */
enum
task_subtypes
subtype
;
/*! Should the scheduler skip this task ? */
/*! Should the scheduler skip this task ? */
char
skip
;
char
skip
;
...
...
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