diff options
author | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-17 16:54:01 (GMT) |
---|---|---|
committer | Daniel Spangberg <daniels@kemi.uu.se> | 2013-05-17 16:54:01 (GMT) |
commit | ecf039adfd38ba1a95b94f1bdc22f01928cb81c5 (patch) | |
tree | eb3ee60ed08cc65fe02b103e4bf9fe34750c63b1 /include/compression/tng_compress.h | |
parent | 6ae393dbe7ffda9c2340503c82d062cb8d7c6f41 (diff) |
Added conversion from unpacked integers to float/double.
Added tests for recompression (uncompress to int, compress int)
Added tests for conversion from unpacked integers to float/double.
Diffstat (limited to 'include/compression/tng_compress.h')
-rw-r--r-- | include/compression/tng_compress.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/compression/tng_compress.h b/include/compression/tng_compress.h index 14786d1..5d43ffc 100644 --- a/include/compression/tng_compress.h +++ b/include/compression/tng_compress.h @@ -166,11 +166,21 @@ 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); +/* This converts a block of integers, as obtained from tng_compress_uncompress_int, to floating point values + either double precision or single precision. */ +void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo, + int natoms,int nframes, + double *posvel_double); - /* Compression algorithms (matching the original trajng - assignments) The compression backends require that some of the - algorithms must have the same value. */ +void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo, + int natoms,int nframes, + float *posvel_float); + +/* Compression algorithms (matching the original trajng + assignments) The compression backends require that some of the + algorithms must have the same value. */ + #define TNG_COMPRESS_ALGO_STOPBIT 1 #define TNG_COMPRESS_ALGO_TRIPLET 2 #define TNG_COMPRESS_ALGO_BWLZH1 8 |