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 {
task_type_grav_up,
task_type_grav_external,
task_type_count
};
} __attribute__((packed));
/**
* @brief The different task sub-types (for pairs, selfs and sub-tasks).
......@@ -65,7 +65,7 @@ enum task_subtypes {
task_subtype_grav,
task_subtype_tend,
task_subtype_count
};
} __attribute__((packed));
/**
* @brief The type of particles/objects this task acts upon in a given cell.
......@@ -94,35 +94,32 @@ extern const char *subtaskID_names[];
*/
struct task {
/*! Type of the task */
enum task_types type;
/*! Pointers to the cells this task acts upon */
struct cell *ci, *cj;
/*! Sub-type of the task (for the tasks that have one */
enum task_subtypes subtype;
/*! List of tasks unlocked by this one */
struct task **unlock_tasks;
/*! Start and end time of this task */
ticks tic, toc;
/*! Flags used to carry additional information (e.g. sort directions) */
int flags;
/*! Number of unsatisfied dependencies */
int wait;
/*! Rank of a task in the order */
int rank;
/*! Weight of the task */
int weight;
/*! Pointers to the cells this task acts upon */
struct cell *ci, *cj;
/*! ID of the queue or runner owning this task */
int rid;
short int rid;
/*! Number of tasks unlocked by this one */
int nr_unlock_tasks;
short int nr_unlock_tasks;
/*! List of tasks unlocked by this one */
struct task **unlock_tasks;
/*! Number of unsatisfied dependencies */
short int wait;
#ifdef WITH_MPI
......@@ -134,8 +131,11 @@ struct task {
#endif
/*! Start and end time of this task */
ticks tic, toc;
/*! Type of the task */
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 ? */
char skip;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment