diff options
author | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-16 08:55:44 (GMT) |
---|---|---|
committer | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-16 08:55:44 (GMT) |
commit | e70cadd9f3f6494ad55efa5e917a12cf18c60d26 (patch) | |
tree | 2e3a6a5ee37b0dc54bfee5b3731f8eb1dad09e6c /include/compression/tng_compress.h | |
parent | cc2dae1f5171d40cc719220dd8a9a2de6c5c4334 (diff) |
Separated quantization and compression/uncompression more, to allow compression/uncompression of float data. Also added compression/uncompression of integer data, which will allow for recompression.
Diffstat (limited to 'include/compression/tng_compress.h')
-rw-r--r-- | include/compression/tng_compress.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/compression/tng_compress.h b/include/compression/tng_compress.h index eefcfaa..14786d1 100644 --- a/include/compression/tng_compress.h +++ b/include/compression/tng_compress.h @@ -52,7 +52,16 @@ char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, int natoms, int nframes, double desired_precision, int speed, int *algo, int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, int natoms, int nframes, + float desired_precision, + int speed, int *algo, + int *nitems); +char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, int natoms, int nframes, + unsigned long prec_hi, unsigned long prec_lo, + int speed,int *algo, + int *nitems); /* The tng_compress_pos_find_algo works the same as tng_compress_pos, but it performs benchmarking to find the algorithms with the best @@ -84,6 +93,17 @@ char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, int natoms, int int speed, int *algo, int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, int natoms, int nframes, + float desired_precision, + int speed, + int *algo, + int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, int natoms, int nframes, + unsigned long prec_hi, unsigned long prec_lo, + int speed,int *algo, + int *nitems); /* This returns the number of integers required for the storage of the algorithm with the best compression ratio. */ @@ -98,6 +118,16 @@ char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, int natoms, int nframes, double desired_precision, int speed, int *algo, int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, int natoms, int nframes, + float desired_precision, + int speed, int *algo, + int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, int natoms, int nframes, + unsigned long prec_hi, unsigned long prec_lo, + int speed, int *algo, + int *nitems); char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, int natoms, int nframes, double desired_precision, @@ -105,6 +135,18 @@ char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, int natoms, int int *algo, int *nitems); +char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, int natoms, int nframes, + float desired_precision, + int speed, + int *algo, + int *nitems); + +char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, int natoms, int nframes, + unsigned long prec_hi, unsigned long prec_lo, + int speed, + int *algo, + int *nitems); + /* From a compressed block, obtain information about whether it is a position or velocity block: *vel=1 means velocity block, *vel=0 means position block. @@ -120,6 +162,10 @@ int DECLSPECDLLEXPORT tng_compress_inquire(char *data,int *vel, int *natoms, */ int DECLSPECDLLEXPORT tng_compress_uncompress(char *data,double *posvel); +int DECLSPECDLLEXPORT tng_compress_uncompress_float(char *data,float *posvel); + +int DECLSPECDLLEXPORT tng_compress_uncompress_int(char *data,int *posvel, unsigned long *prec_hi, unsigned long *prec_lo); + /* Compression algorithms (matching the original trajng assignments) The compression backends require that some of the |