Skip to content
Snippets Groups Projects
Commit e15891f8 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

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!238Pack the task types and re-arrange the task structure to go from 80 bytes to 64 bytes.
...@@ -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 */
struct task **unlock_tasks; short 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment