diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2012-12-21 16:07:09 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2012-12-21 16:07:09 (GMT) |
commit | 076cdb5ad3e91e074bf29c5bf2d2b47ba80119ca (patch) | |
tree | 8a70e0a72ac6dc14e224ea196a5cfd9fd1f59d1e /src/lib/tng_io.h | |
parent | e9e701487d602e494ff262af1bd4ce8b6c221f75 (diff) |
Make data writing work for one frame at a time. Other minor fixes.
Diffstat (limited to 'src/lib/tng_io.h')
-rw-r--r-- | src/lib/tng_io.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/tng_io.h b/src/lib/tng_io.h index c049218..97c590f 100644 --- a/src/lib/tng_io.h +++ b/src/lib/tng_io.h @@ -1322,7 +1322,10 @@ tng_function_status tng_frame_data_write_(tng_trajectory_t tng_data, * will be opened. * @param frame_nr is the index number of the frame to write. * @param block_id is the ID of the data block to write the data to. - * @param data is a 2D-array of data to write. The length of the array should + * @param val_first_particle is the number of the first particle in the data + * array. + * @param val_n_particles is the number of particles in the data array. + * @param data is a 1D-array of data to write. The length of the array should * equal n_particles * n_values_per_frame. * @param hash_mode is an option to decide whether to use the md5 hash or not. * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be @@ -1333,15 +1336,21 @@ tng_function_status tng_frame_data_write_(tng_trajectory_t tng_data, tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data, const int64_t frame_nr, const int64_t block_id, - const void **data, - const tng_hash_mode hash_mode); + const int64_t val_first_particle, + const int64_t val_n_particles, + const void *data, + const tng_hash_mode hash_mode); tng_function_status tng_frame_particle_data_write_(tng_trajectory_t tng_data, const int64_t *frame_nr, const int64_t *block_id, - const void **data, - const tng_hash_mode *hash_mode) + const int64_t *val_first_particle, + const int64_t *val_n_particles, + const void *data, + const tng_hash_mode *hash_mode) { - return(tng_frame_particle_data_write(tng_data, *frame_nr, *block_id, data, *hash_mode)); + return(tng_frame_particle_data_write(tng_data, *frame_nr, *block_id, + *val_first_particle, *val_n_particles, + data, *hash_mode)); } /** |