Commit cd78138f authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Format

parent eb83729b
...@@ -253,8 +253,8 @@ int main(int argc, char *argv[]) { ...@@ -253,8 +253,8 @@ int main(int argc, char *argv[]) {
"Overwrite the CPU " "Overwrite the CPU "
"frequency (Hz) to be used for time measurements.", "frequency (Hz) to be used for time measurements.",
NULL, 0, 0), NULL, 0, 0),
OPT_BOOLEAN(0, "logger", &with_logger, OPT_BOOLEAN(0, "logger", &with_logger, "Run with the particle logger.",
"Run with the particle logger.", NULL, 0, 0), NULL, 0, 0),
OPT_INTEGER('n', "steps", &nsteps, OPT_INTEGER('n', "steps", &nsteps,
"Execute a fixed number of time steps. When unset use the " "Execute a fixed number of time steps. When unset use the "
"time_end parameter to stop.", "time_end parameter to stop.",
...@@ -335,7 +335,9 @@ int main(int argc, char *argv[]) { ...@@ -335,7 +335,9 @@ int main(int argc, char *argv[]) {
#if !defined(WITH_LOGGER) #if !defined(WITH_LOGGER)
if (with_logger) { if (with_logger) {
printf("Error: the particle logger is not available, please compile with --enable-logger."); printf(
"Error: the particle logger is not available, please compile with "
"--enable-logger.");
return 1; return 1;
} }
#endif #endif
......
...@@ -123,8 +123,7 @@ const char *engine_policy_names[] = {"none", ...@@ -123,8 +123,7 @@ const char *engine_policy_names[] = {"none",
"fof search", "fof search",
"time-step limiter", "time-step limiter",
"time-step sync", "time-step sync",
"logger" "logger"};
};
/** The rank of the engine as a global variable (for messages). */ /** The rank of the engine as a global variable (for messages). */
int engine_rank; int engine_rank;
...@@ -457,14 +456,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts, ...@@ -457,14 +456,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (e->policy & engine_policy_logger) { if (e->policy & engine_policy_logger) {
const uint32_t logger_flag = logger_pack_flags_and_data( const uint32_t logger_flag =
logger_flag_mpi_exit, node_id); logger_pack_flags_and_data(logger_flag_mpi_exit, node_id);
/* Log the particle when leaving a rank. */ /* Log the particle when leaving a rank. */
logger_log_part(e->logger, &s->parts[offset_parts + k], logger_log_part(
&s->xparts[offset_parts + k], e->logger, &s->parts[offset_parts + k], &s->xparts[offset_parts + k],
logger_masks_all_part | logger_masks_all_part | logger_mask_data[logger_special_flags].mask,
logger_mask_data[logger_special_flags].mask,
logger_flag); logger_flag);
} }
#endif #endif
...@@ -506,13 +504,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts, ...@@ -506,13 +504,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (e->policy & engine_policy_logger) { if (e->policy & engine_policy_logger) {
const uint32_t logger_flag = logger_pack_flags_and_data( const uint32_t logger_flag =
logger_flag_mpi_exit, node_id); logger_pack_flags_and_data(logger_flag_mpi_exit, node_id);
/* Log the particle when leaving a rank. */ /* Log the particle when leaving a rank. */
logger_log_spart(e->logger, &s->sparts[offset_sparts + k], logger_log_spart(
logger_masks_all_spart | e->logger, &s->sparts[offset_sparts + k],
logger_mask_data[logger_special_flags].mask, logger_masks_all_spart | logger_mask_data[logger_special_flags].mask,
logger_flag); logger_flag);
} }
#endif #endif
...@@ -592,13 +590,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts, ...@@ -592,13 +590,13 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts,
if ((e->policy & engine_policy_logger) && if ((e->policy & engine_policy_logger) &&
s->gparts[offset_gparts + k].type == swift_type_dark_matter) { s->gparts[offset_gparts + k].type == swift_type_dark_matter) {
const uint32_t logger_flag = logger_pack_flags_and_data( const uint32_t logger_flag =
logger_flag_mpi_exit, node_id); logger_pack_flags_and_data(logger_flag_mpi_exit, node_id);
/* Log the particle when leaving a rank. */ /* Log the particle when leaving a rank. */
logger_log_gpart(e->logger, &s->gparts[offset_gparts + k], logger_log_gpart(
logger_masks_all_gpart | e->logger, &s->gparts[offset_gparts + k],
logger_mask_data[logger_special_flags].mask, logger_masks_all_gpart | logger_mask_data[logger_special_flags].mask,
logger_flag); logger_flag);
} }
#endif #endif
...@@ -824,8 +822,8 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts, ...@@ -824,8 +822,8 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (e->policy & engine_policy_logger) { if (e->policy & engine_policy_logger) {
const uint32_t flag = logger_pack_flags_and_data(logger_flag_mpi_enter, const uint32_t flag =
prox->nodeID); logger_pack_flags_and_data(logger_flag_mpi_enter, prox->nodeID);
struct part *parts = &s->parts[offset_parts + count_parts]; struct part *parts = &s->parts[offset_parts + count_parts];
struct xpart *xparts = &s->xparts[offset_parts + count_parts]; struct xpart *xparts = &s->xparts[offset_parts + count_parts];
...@@ -833,9 +831,9 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts, ...@@ -833,9 +831,9 @@ void engine_exchange_strays(struct engine *e, const size_t offset_parts,
struct gpart *gparts = &s->gparts[offset_gparts + count_gparts]; struct gpart *gparts = &s->gparts[offset_gparts + count_gparts];
/* Log the gas particles */ /* Log the gas particles */
logger_log_parts(e->logger, parts, xparts, logger_log_parts(
prox->nr_parts_in, logger_masks_all_part | e->logger, parts, xparts, prox->nr_parts_in,
logger_mask_data[logger_special_flags].mask, logger_masks_all_part | logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the stellar particles */ /* Log the stellar particles */
......
...@@ -867,8 +867,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -867,8 +867,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
/* Create a variable in order to avoid to many ifdef */ /* Create a variable in order to avoid to many ifdef */
kick2_or_logger = c->logger; kick2_or_logger = c->logger;
} } else {
else {
kick2_or_logger = c->kick2; kick2_or_logger = c->kick2;
} }
#else #else
...@@ -1186,8 +1185,7 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1186,8 +1185,7 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (with_logger) { if (with_logger) {
scheduler_addunlock(s, c->super->logger, c->stars.stars_in); scheduler_addunlock(s, c->super->logger, c->stars.stars_in);
} } else {
else {
scheduler_addunlock(s, c->super->kick2, c->stars.stars_in); scheduler_addunlock(s, c->super->kick2, c->stars.stars_in);
} }
#else #else
...@@ -1223,10 +1221,11 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c, ...@@ -1223,10 +1221,11 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
if (with_logger) { if (with_logger) {
scheduler_addunlock(s, c->super->logger, c->black_holes.black_holes_in); scheduler_addunlock(s, c->super->logger,
} c->black_holes.black_holes_in);
else { } else {
scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in); scheduler_addunlock(s, c->super->kick2,
c->black_holes.black_holes_in);
} }
#else #else
scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in); scheduler_addunlock(s, c->super->kick2, c->black_holes.black_holes_in);
......
...@@ -984,7 +984,7 @@ void engine_redistribute(struct engine *e) { ...@@ -984,7 +984,7 @@ void engine_redistribute(struct engine *e) {
size_t gpart_offset = 0; size_t gpart_offset = 0;
size_t bpart_offset = 0; size_t bpart_offset = 0;
for(int i = 0; i < nr_nodes; i++) { for (int i = 0; i < nr_nodes; i++) {
const size_t c_ind = engine_rank * nr_nodes + i; const size_t c_ind = engine_rank * nr_nodes + i;
/* No need to log the local particles. */ /* No need to log the local particles. */
...@@ -995,26 +995,24 @@ void engine_redistribute(struct engine *e) { ...@@ -995,26 +995,24 @@ void engine_redistribute(struct engine *e) {
bpart_offset += b_counts[c_ind]; bpart_offset += b_counts[c_ind];
continue; continue;
} }
const uint32_t flag = logger_pack_flags_and_data( const uint32_t flag = logger_pack_flags_and_data(logger_flag_mpi_exit, i);
logger_flag_mpi_exit, i);
/* Log the hydro parts. */ /* Log the hydro parts. */
logger_log_parts(e->logger, &parts[part_offset], logger_log_parts(
&xparts[part_offset], counts[c_ind], e->logger, &parts[part_offset], &xparts[part_offset], counts[c_ind],
logger_masks_all_part | logger_masks_all_part | logger_mask_data[logger_special_flags].mask,
logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the stellar parts. */ /* Log the stellar parts. */
logger_log_sparts(e->logger, &sparts[spart_offset], s_counts[c_ind], logger_log_sparts(
logger_masks_all_spart | e->logger, &sparts[spart_offset], s_counts[c_ind],
logger_mask_data[logger_special_flags].mask, logger_masks_all_spart | logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the gparts */ /* Log the gparts */
logger_log_gparts(e->logger, &gparts[gpart_offset], g_counts[c_ind], logger_log_gparts(
logger_masks_all_gpart | e->logger, &gparts[gpart_offset], g_counts[c_ind],
logger_mask_data[logger_special_flags].mask, logger_masks_all_gpart | logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the bparts */ /* Log the bparts */
...@@ -1090,7 +1088,7 @@ void engine_redistribute(struct engine *e) { ...@@ -1090,7 +1088,7 @@ void engine_redistribute(struct engine *e) {
size_t gpart_offset = 0; size_t gpart_offset = 0;
size_t bpart_offset = 0; size_t bpart_offset = 0;
for(int i = 0; i < nr_nodes; i++) { for (int i = 0; i < nr_nodes; i++) {
const size_t c_ind = i * nr_nodes + engine_rank; const size_t c_ind = i * nr_nodes + engine_rank;
/* No need to log the local particles. */ /* No need to log the local particles. */
...@@ -1102,26 +1100,25 @@ void engine_redistribute(struct engine *e) { ...@@ -1102,26 +1100,25 @@ void engine_redistribute(struct engine *e) {
continue; continue;
} }
const uint32_t flag = logger_pack_flags_and_data( const uint32_t flag =
logger_flag_mpi_enter, i); logger_pack_flags_and_data(logger_flag_mpi_enter, i);
/* Log the hydro parts. */ /* Log the hydro parts. */
logger_log_parts(e->logger, &parts[part_offset], logger_log_parts(
&xparts[part_offset], counts[c_ind], e->logger, &parts[part_offset], &xparts[part_offset], counts[c_ind],
logger_masks_all_part | logger_masks_all_part | logger_mask_data[logger_special_flags].mask,
logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the stellar parts. */ /* Log the stellar parts. */
logger_log_sparts(e->logger, &sparts[spart_offset], s_counts[c_ind], logger_log_sparts(
logger_masks_all_spart | e->logger, &sparts[spart_offset], s_counts[c_ind],
logger_mask_data[logger_special_flags].mask, logger_masks_all_spart | logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the gparts */ /* Log the gparts */
logger_log_gparts(e->logger, &gparts[gpart_offset], g_counts[c_ind], logger_log_gparts(
logger_masks_all_gpart | e->logger, &gparts[gpart_offset], g_counts[c_ind],
logger_mask_data[logger_special_flags].mask, logger_masks_all_gpart | logger_mask_data[logger_special_flags].mask,
flag); flag);
/* Log the bparts */ /* Log the bparts */
......
...@@ -181,8 +181,7 @@ void logger_log_all(struct logger_writer *log, const struct engine *e) { ...@@ -181,8 +181,7 @@ void logger_log_all(struct logger_writer *log, const struct engine *e) {
/* loop over all parts. */ /* loop over all parts. */
for (size_t i = 0; i < s->nr_parts; i++) { for (size_t i = 0; i < s->nr_parts; i++) {
logger_log_part(log, &s->parts[i], &s->xparts[i], logger_log_part(log, &s->parts[i], &s->xparts[i], logger_masks_all_part,
logger_masks_all_part,
/* Special flags */ 0); /* Special flags */ 0);
} }
...@@ -214,8 +213,7 @@ void logger_log_all(struct logger_writer *log, const struct engine *e) { ...@@ -214,8 +213,7 @@ void logger_log_all(struct logger_writer *log, const struct engine *e) {
* @param buff The buffer to use when writing. * @param buff The buffer to use when writing.
* @param special_flags The data for the special flags. * @param special_flags The data for the special flags.
*/ */
void logger_copy_part_fields( void logger_copy_part_fields(const struct part *p, unsigned int mask,
const struct part *p, unsigned int mask,
size_t *offset, size_t offset_new, char *buff, size_t *offset, size_t offset_new, char *buff,
const uint32_t special_flags) { const uint32_t special_flags) {
...@@ -281,7 +279,6 @@ void logger_copy_part_fields( ...@@ -281,7 +279,6 @@ void logger_copy_part_fields(
memcpy(buff, &special_flags, logger_mask_data[logger_special_flags].size); memcpy(buff, &special_flags, logger_mask_data[logger_special_flags].size);
buff += logger_mask_data[logger_special_flags].size; buff += logger_mask_data[logger_special_flags].size;
} }
} }
/** /**
...@@ -297,8 +294,7 @@ void logger_log_part(struct logger_writer *log, const struct part *p, ...@@ -297,8 +294,7 @@ void logger_log_part(struct logger_writer *log, const struct part *p,
struct xpart *xp, unsigned int mask, struct xpart *xp, unsigned int mask,
const uint32_t special_flags) { const uint32_t special_flags) {
logger_log_parts(log, p, xp, /* count */ 1, mask, logger_log_parts(log, p, xp, /* count */ 1, mask, special_flags);
special_flags);
} }
/** /**
...@@ -320,7 +316,7 @@ void logger_log_parts(struct logger_writer *log, const struct part *p, ...@@ -320,7 +316,7 @@ void logger_log_parts(struct logger_writer *log, const struct part *p,
size_t offset_new; size_t offset_new;
char *buff = (char *)dump_get(&log->dump, count * size, &offset_new); char *buff = (char *)dump_get(&log->dump, count * size, &offset_new);
for(int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
/* Copy everything into the buffer */ /* Copy everything into the buffer */
logger_copy_part_fields(&p[i], mask, &xp[i].logger_data.last_offset, logger_copy_part_fields(&p[i], mask, &xp[i].logger_data.last_offset,
offset_new, buff, special_flags); offset_new, buff, special_flags);
...@@ -343,8 +339,7 @@ void logger_log_parts(struct logger_writer *log, const struct part *p, ...@@ -343,8 +339,7 @@ void logger_log_parts(struct logger_writer *log, const struct part *p,
* @param buff The buffer to use when writing. * @param buff The buffer to use when writing.
* @param special_flags The data for the special flags. * @param special_flags The data for the special flags.
*/ */
void logger_copy_spart_fields( void logger_copy_spart_fields(const struct spart *sp, unsigned int mask,
const struct spart *sp, unsigned int mask,
size_t *offset, size_t offset_new, char *buff, size_t *offset, size_t offset_new, char *buff,
const uint32_t special_flags) { const uint32_t special_flags) {
...@@ -401,8 +396,7 @@ void logger_copy_spart_fields( ...@@ -401,8 +396,7 @@ void logger_copy_spart_fields(
void logger_log_spart(struct logger_writer *log, struct spart *sp, void logger_log_spart(struct logger_writer *log, struct spart *sp,
unsigned int mask, const uint32_t special_flags) { unsigned int mask, const uint32_t special_flags) {
logger_log_sparts(log, sp, /* count */ 1, mask, logger_log_sparts(log, sp, /* count */ 1, mask, special_flags);
special_flags);
} }
/** /**
...@@ -414,9 +408,8 @@ void logger_log_spart(struct logger_writer *log, struct spart *sp, ...@@ -414,9 +408,8 @@ void logger_log_spart(struct logger_writer *log, struct spart *sp,
* @param count The number of particle to dump. * @param count The number of particle to dump.
* @param special_flags The value of the special flags. * @param special_flags The value of the special flags.
*/ */
void logger_log_sparts(struct logger_writer *log, struct spart *sp, void logger_log_sparts(struct logger_writer *log, struct spart *sp, int count,
int count, unsigned int mask, unsigned int mask, const uint32_t special_flags) {
const uint32_t special_flags) {
/* Start by computing the size of the message. */ /* Start by computing the size of the message. */
const int size = logger_compute_chunk_size(mask); const int size = logger_compute_chunk_size(mask);
...@@ -424,7 +417,7 @@ void logger_log_sparts(struct logger_writer *log, struct spart *sp, ...@@ -424,7 +417,7 @@ void logger_log_sparts(struct logger_writer *log, struct spart *sp,
size_t offset_new; size_t offset_new;
char *buff = (char *)dump_get(&log->dump, count * size, &offset_new); char *buff = (char *)dump_get(&log->dump, count * size, &offset_new);
for(int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
/* Copy everything into the buffer */ /* Copy everything into the buffer */
logger_copy_spart_fields(&sp[i], mask, &sp[i].logger_data.last_offset, logger_copy_spart_fields(&sp[i], mask, &sp[i].logger_data.last_offset,
offset_new, buff, special_flags); offset_new, buff, special_flags);
...@@ -447,8 +440,7 @@ void logger_log_sparts(struct logger_writer *log, struct spart *sp, ...@@ -447,8 +440,7 @@ void logger_log_sparts(struct logger_writer *log, struct spart *sp,
* @param buff The buffer to use when writing. * @param buff The buffer to use when writing.
* @param special_flags The data of the special flag. * @param special_flags The data of the special flag.
*/ */
void logger_copy_gpart_fields( void logger_copy_gpart_fields(const struct gpart *gp, unsigned int mask,
const struct gpart *gp, unsigned int mask,
size_t *offset, size_t offset_new, char *buff, size_t *offset, size_t offset_new, char *buff,
const uint32_t special_flags) { const uint32_t special_flags) {
...@@ -503,7 +495,6 @@ void logger_copy_gpart_fields( ...@@ -503,7 +495,6 @@ void logger_copy_gpart_fields(
memcpy(buff, &special_flags, logger_mask_data[logger_special_flags].size); memcpy(buff, &special_flags, logger_mask_data[logger_special_flags].size);
buff += logger_mask_data[logger_special_flags].size; buff += logger_mask_data[logger_special_flags].size;
} }
} }
/** /**
...@@ -528,9 +519,8 @@ void logger_log_gpart(struct logger_writer *log, struct gpart *p, ...@@ -528,9 +519,8 @@ void logger_log_gpart(struct logger_writer *log, struct gpart *p,
* @param count The number of particle to dump. * @param count The number of particle to dump.
* @param special_flags The value of the special flags. * @param special_flags The value of the special flags.
*/ */
void logger_log_gparts(struct logger_writer *log, struct gpart *p, void logger_log_gparts(struct logger_writer *log, struct gpart *p, int count,
int count, unsigned int mask, unsigned int mask, const uint32_t special_flags) {
const uint32_t special_flags) {
/* Start by computing the size of the message. */ /* Start by computing the size of the message. */
const int size = logger_compute_chunk_size(mask); const int size = logger_compute_chunk_size(mask);
...@@ -538,7 +528,7 @@ void logger_log_gparts(struct logger_writer *log, struct gpart *p, ...@@ -538,7 +528,7 @@ void logger_log_gparts(struct logger_writer *log, struct gpart *p,
size_t offset_new; size_t offset_new;
char *buff = (char *)dump_get(&log->dump, count * size, &offset_new); char *buff = (char *)dump_get(&log->dump, count * size, &offset_new);
for(int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
/* Log only the dark matter */ /* Log only the dark matter */
if (p[i].type != swift_type_dark_matter) continue; if (p[i].type != swift_type_dark_matter) continue;
...@@ -945,7 +935,6 @@ int logger_read_timestamp(unsigned long long int *t, double *time, ...@@ -945,7 +935,6 @@ int logger_read_timestamp(unsigned long long int *t, double *time,
return mask; return mask;
} }
/** /**
* @brief Write a swift_params struct to the given FILE as a stream of bytes. * @brief Write a swift_params struct to the given FILE as a stream of bytes.
* *
...@@ -957,7 +946,6 @@ void logger_struct_dump(const struct logger_writer *log, FILE *stream) { ...@@ -957,7 +946,6 @@ void logger_struct_dump(const struct logger_writer *log, FILE *stream) {
"logger", "logger"); "logger", "logger");
} }
/** /**
* @brief Restore a logger struct from the given FILE as a stream of * @brief Restore a logger struct from the given FILE as a stream of
* bytes. * bytes.
......
...@@ -94,18 +94,19 @@ enum logger_masks_number { ...@@ -94,18 +94,19 @@ enum logger_masks_number {
/* Defines some mask for logging all the fields */ /* Defines some mask for logging all the fields */
enum logger_masks_all { enum logger_masks_all {
logger_masks_all_part = (1 << logger_x) | (1 << logger_v) | logger_masks_all_part = (1 << logger_x) | (1 << logger_v) | (1 << logger_a) |
(1 << logger_a) | (1 << logger_u) | (1 << logger_h) | (1 << logger_rho) | (1 << logger_u) | (1 << logger_h) |
(1 << logger_consts), (1 << logger_rho) | (1 << logger_consts),
logger_masks_all_gpart = (1 << logger_x) | (1 << logger_v) | logger_masks_all_gpart = (1 << logger_x) | (1 << logger_v) | (1 << logger_a) |
(1 << logger_a) | (1 << logger_consts),
logger_masks_all_spart = (1 << logger_x) | (1 << logger_v) |
(1 << logger_consts), (1 << logger_consts),
logger_masks_all_spart =
(1 << logger_x) | (1 << logger_v) | (1 << logger_consts),
} __attribute__((packed)); } __attribute__((packed));
enum logger_special_flags { enum logger_special_flags {
logger_flag_change_type = 1, /* Flag for a change of particle type */ logger_flag_change_type = 1, /* Flag for a change of particle type */
logger_flag_mpi_enter, /* Flag for a particle received from another MPI rank */ logger_flag_mpi_enter, /* Flag for a particle received from another MPI rank
*/
logger_flag_mpi_exit, /* Flag for a particle sent to another MPI rank */ logger_flag_mpi_exit, /* Flag for a particle sent to another MPI rank */
logger_flag_delete, /* Flag for a deleted particle */ logger_flag_delete, /* Flag for a deleted particle */
logger_flag_create, /* Flag for a created particle */ logger_flag_create, /* Flag for a created particle */
...@@ -176,18 +177,16 @@ void logger_log_part(struct logger_writer *log, const struct part *p, ...@@ -176,18 +177,16 @@ void logger_log_part(struct logger_writer *log, const struct part *p,
struct xpart *xp, unsigned int mask, struct xpart *xp, unsigned int mask,
const uint32_t special_flags); const uint32_t special_flags);
void logger_log_parts(struct logger_writer *log, const struct part *p, void logger_log_parts(struct logger_writer *log, const struct part *p,
struct xpart *xp, int count, struct xpart *xp, int count, unsigned int mask,
unsigned int mask, const uint32_t special_flags); const uint32_t special_flags);
void logger_log_spart(struct logger_writer *log, struct spart *p, void logger_log_spart(struct logger_writer *log, struct spart *p,
unsigned int mask, const uint32_t special_flags); unsigned int mask, const uint32_t special_flags);
void logger_log_sparts(struct logger_writer *log, struct spart *sp, void logger_log_sparts(struct logger_writer *log, struct spart *sp, int count,
int count, unsigned int mask, unsigned int mask, const uint32_t special_flags);
const uint32_t special_flags);
void logger_log_gpart(struct logger_writer *log, struct gpart *p, void logger_log_gpart(struct logger_writer *log, struct gpart *p,
unsigned int mask, const uint32_t special_flags); unsigned int mask, const uint32_t special_flags);
void logger_log_gparts(struct logger_writer *log, struct gpart *gp, void logger_log_gparts(struct logger_writer *log, struct gpart *gp, int count,
int count, unsigned int mask, unsigned int mask, const uint32_t special_flags);
const uint32_t special_flags);
void logger_init(struct logger_writer *log, struct swift_params *params); void logger_init(struct logger_writer *log, struct swift_params *params);
void logger_free(struct logger_writer *log); void logger_free(struct logger_writer *log);
void logger_log_timestamp(struct logger_writer *log, integertime_t t, void logger_log_timestamp(struct logger_writer *log, integertime_t t,
...@@ -203,23 +202,27 @@ int logger_read_timestamp(unsigned long long int *t, double *time, ...@@ -203,23 +202,27 @@ int logger_read_timestamp(unsigned long long int *t, double *time,
void logger_struct_dump(const struct logger_writer *log, FILE *stream); void logger_struct_dump(const struct logger_writer *log, FILE *stream);
void logger_struct_restore(struct logger_writer *log, FILE *stream); void logger_struct_restore(struct logger_writer *log, FILE *stream);
/** /**
* @brief Generate the data for the special flags. * @brief Generate the data for the special flags.
* *
* @param flag The special flag to use. * @param flag The special flag to use.
* @param data The data to write in the . * @param data The data to write in the .
*/