66 #define PTYPE_FOF_GROUP 1024
85 void petaio_save_block(BigFile * bf,
const char * blockname, BigArray * array,
int verbose);
86 int petaio_read_block(BigFile * bf,
const char * blockname, BigArray * array,
int required);
113 #define IO_REG(name, dtype, items, ptype, IOTable) \
114 io_register_io_block(# name, dtype, items, ptype, (property_getter) GT ## name , (property_setter) ST ## name, 1, IOTable)
115 #define IO_REG_TYPE(name, dtype, items, ptype, IOTable) \
116 io_register_io_block(# name, dtype, items, ptype, (property_getter) GT ## ptype ## name , (property_setter) ST ## ptype ## name, 0, IOTable)
117 #define IO_REG_WRONLY(name, dtype, items, ptype, IOTable) \
118 io_register_io_block(# name, dtype, items, ptype, (property_getter) GT ## name , NULL, 1, IOTable)
119 #define IO_REG_NONFATAL(name, dtype, items, ptype, IOTable) \
120 io_register_io_block(# name, dtype, items, ptype, (property_getter) GT ## name , (property_setter) ST ## name, 0, IOTable)
145 #define SIMPLE_GETTER(name, field, type, items, stype) \
146 static void name(int i, type * out, void * baseptr, void * slotptr, const struct conversions * params) { \
148 for(k = 0; k < items; k ++) { \
149 out[k] = *(&(((stype *)baseptr)[i].field) + k); \
152 #define SIMPLE_SETTER(name, field, type, items, stype) \
153 static void name(int i, type * out, void * baseptr, void * slotptr, const struct conversions * params) { \
155 for(k = 0; k < items; k ++) { \
156 *(&(((stype *)baseptr)[i].field) + k) = out[k]; \
struct part_manager_type PartManager[1]
void petaio_destroy_buffer(BigArray *array)
void petaio_read_snapshot(int num, const char *OutputDir, Cosmology *CP, struct header_data *header, struct part_manager_type *PartManager, struct slots_manager_type *SlotsManager, MPI_Comm Comm)
void io_register_io_block(const char *name, const char *dtype, int items, int ptype, property_getter getter, property_setter setter, int required, struct IOTable *IOTable)
void(* property_setter)(int i, void *target, void *baseptr, void *slotptr, const struct conversions *params)
struct header_data petaio_read_header(int num, const char *OutputDir, Cosmology *CP)
void destroy_io_blocks(struct IOTable *IOTable)
void(* property_getter)(int i, void *result, void *baseptr, void *slotptr, const struct conversions *params)
void register_io_blocks(struct IOTable *IOTable, int WriteGroupID, int MetalReturnOn)
int petaio_read_block(BigFile *bf, const char *blockname, BigArray *array, int required)
void petaio_alloc_buffer(BigArray *array, IOTableEntry *ent, int64_t npartLocal)
void petaio_save_snapshot(const char *fname, struct IOTable *IOTable, int verbose, const double atime, const Cosmology *CP)
void register_debug_io_blocks(struct IOTable *IOTable)
char * petaio_get_snapshot_fname(int num, const char *OutputDir)
void petaio_build_selection(int *selection, int *ptype_offset, int *ptype_count, const struct particle_data *Parts, const int NumPart, int(*select_func)(int i, const struct particle_data *Parts))
int GetUsePeculiarVelocity(void)
void set_petaio_params(ParameterSet *ps)
struct IOTableEntry IOTableEntry
int(* petaio_selection)(int i)
void petaio_build_buffer(BigArray *array, IOTableEntry *ent, const int *selection, const int NumSelection, struct particle_data *Parts, struct slots_manager_type *SlotsManager, struct conversions *conv)
void petaio_readout_buffer(BigArray *array, IOTableEntry *ent, struct conversions *conv, struct part_manager_type *PartManager, struct slots_manager_type *SlotsManager)
void petaio_save_block(BigFile *bf, const char *blockname, BigArray *array, int verbose)
struct slots_manager_type SlotsManager[1]
static enum TransferType ptype