summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/compression/tng_compress.h68
-rw-r--r--include/compression/tng_compress_testing.h.in6
-rw-r--r--include/md5.h26
-rw-r--r--include/tng_io.h184
4 files changed, 186 insertions, 98 deletions
diff --git a/include/compression/tng_compress.h b/include/compression/tng_compress.h
index eefcfaa..0858952 100644
--- a/include/compression/tng_compress.h
+++ b/include/compression/tng_compress.h
@@ -19,11 +19,13 @@
#endif /* win32... */
#endif /* not defined USE_WINDOWS */
+#ifndef DECLSPECDLLEXPORT
#ifdef USE_WINDOWS
#define DECLSPECDLLEXPORT __declspec(dllexport)
-#else
+#else /* USE_WINDOWS */
#define DECLSPECDLLEXPORT
-#endif
+#endif /* USE_WINDOWS */
+#endif /* DECLSPECDLLEXPORT */
#ifdef __cplusplus
extern "C" {
@@ -52,7 +54,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 +95,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 +120,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 +137,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,11 +164,25 @@ 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
- algorithms must have the same value. */
+/* 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);
+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
diff --git a/include/compression/tng_compress_testing.h.in b/include/compression/tng_compress_testing.h.in
new file mode 100644
index 0000000..168764b
--- /dev/null
+++ b/include/compression/tng_compress_testing.h.in
@@ -0,0 +1,6 @@
+#ifndef TNG_COMPRESS_TESTING_H
+#define TNG_COMPRESS_TESTING_H
+
+#define TNG_COMPRESS_FILES_DIR "@TNG_COMPRESS_FILES_DIR@"
+
+#endif
diff --git a/include/md5.h b/include/md5.h
index 3652594..d618489 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -49,12 +49,6 @@
#ifndef md5_INCLUDED
# define md5_INCLUDED
-#ifndef USE_WINDOWS
-#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
-#define USE_WINDOWS
-#endif /* win32... */
-#endif /* not defined USE_WINDOWS */
-
/*
* This package supports both compile-time and run-time determination of CPU
* byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
@@ -80,14 +74,28 @@ extern "C"
{
#endif
+#ifndef USE_WINDOWS
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+#define USE_WINDOWS
+#endif /* win32... */
+#endif /* not defined USE_WINDOWS */
+
+#ifndef DECLSPECDLLEXPORT
+#ifdef USE_WINDOWS
+#define DECLSPECDLLEXPORT __declspec(dllexport)
+#else /* USE_WINDOWS */
+#define DECLSPECDLLEXPORT
+#endif /* USE_WINDOWS */
+#endif /* DECLSPECDLLEXPORT */
+
/* Initialize the algorithm. */
-void md5_init(md5_state_t *pms);
+void DECLSPECDLLEXPORT tng_md5_init(md5_state_t *pms);
/* Append a string to the message. */
-void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
+void DECLSPECDLLEXPORT tng_md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
/* Finish the message and return the digest. */
-void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
+void DECLSPECDLLEXPORT tng_md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
#ifdef __cplusplus
} /* end extern "C" */
diff --git a/include/tng_io.h b/include/tng_io.h
index aa845e2..f2ae1c9 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -334,6 +334,21 @@ typedef unsigned long long int uint64_t;
#endif
+#ifndef USE_WINDOWS
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+#define USE_WINDOWS
+#endif /* win32... */
+#endif /* not defined USE_WINDOWS */
+
+#ifndef DECLSPECDLLEXPORT
+#ifdef USE_WINDOWS
+#define DECLSPECDLLEXPORT __declspec(dllexport)
+#else /* USE_WINDOWS */
+#define DECLSPECDLLEXPORT
+#endif /* USE_WINDOWS */
+#endif /* DECLSPECDLLEXPORT */
+
+
/** The version of this TNG build */
#define TNG_VERSION 2
@@ -349,7 +364,7 @@ typedef unsigned long long int uint64_t;
/** The maximum allowed length of a string */
#define TNG_MAX_STR_LEN 1024
-
+#if 0
/** Inline function for finding the lowest of two values */
#define tng_min(a,b) \
({ __typeof__ (a) _a = (a); \
@@ -361,6 +376,7 @@ typedef unsigned long long int uint64_t;
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
+#endif
/** Flag to specify the endianness of a TNG file */
typedef enum {TNG_BIG_ENDIAN,
@@ -575,7 +591,7 @@ tng_function_status tng_util_box_shape_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_trajectory_init(tng_trajectory_t *tng_data_p);
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_init(tng_trajectory_t *tng_data_p);
/**
* @brief Clean up a trajectory data container.
@@ -584,7 +600,7 @@ tng_function_status tng_trajectory_init(tng_trajectory_t *tng_data_p);
* tng_data_p itself.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
/**
* @brief Copy a trajectory data container (dest is setup as well).
@@ -598,7 +614,7 @@ tng_function_status tng_trajectory_destroy(tng_trajectory_t *tng_data_p);
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_trajectory_init_from_src(tng_trajectory_t src,
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajectory_t src,
tng_trajectory_t *dest_p);
/**
@@ -611,7 +627,7 @@ tng_function_status tng_trajectory_init_from_src(tng_trajectory_t src,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_input_file_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_get(const tng_trajectory_t tng_data,
char *file_name, const int max_len);
/**
@@ -621,7 +637,7 @@ tng_function_status tng_input_file_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_input_file_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_set(tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -634,7 +650,7 @@ tng_function_status tng_input_file_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_output_file_get(const tng_trajectory_t tng_data,
char *file_name, const int max_len);
/**
@@ -644,7 +660,7 @@ tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_output_file_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_output_file_set(tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -655,7 +671,7 @@ tng_function_status tng_output_file_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
* could not be retrieved.
*/
-tng_function_status tng_output_file_endianness_get
+tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get
(tng_trajectory_t tng_data, tng_file_endianness *endianness);
/**
@@ -668,7 +684,7 @@ tng_function_status tng_output_file_endianness_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
* could not be set.
*/
-tng_function_status tng_output_file_endianness_set
+tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
(tng_trajectory_t tng_data,
const tng_file_endianness endianness);
@@ -682,7 +698,7 @@ tng_function_status tng_output_file_endianness_set
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_program_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -692,7 +708,7 @@ tng_function_status tng_first_program_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_program_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -705,7 +721,7 @@ tng_function_status tng_first_program_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_program_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -715,7 +731,7 @@ tng_function_status tng_last_program_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_program_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -728,7 +744,7 @@ tng_function_status tng_last_program_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_user_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -738,7 +754,7 @@ tng_function_status tng_first_user_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_user_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -751,7 +767,7 @@ tng_function_status tng_first_user_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_user_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -761,7 +777,7 @@ tng_function_status tng_last_user_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_user_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -774,7 +790,7 @@ tng_function_status tng_last_user_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_computer_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -784,7 +800,7 @@ tng_function_status tng_first_computer_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_computer_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -797,7 +813,7 @@ tng_function_status tng_first_computer_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_computer_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -807,7 +823,7 @@ tng_function_status tng_last_computer_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_computer_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -820,7 +836,7 @@ tng_function_status tng_last_computer_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_first_signature_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_signature_get(const tng_trajectory_t tng_data,
char *signature, const int max_len);
/**
@@ -830,7 +846,7 @@ tng_function_status tng_first_signature_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_first_signature_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_first_signature_set(tng_trajectory_t tng_data,
const char *signature);
/**
@@ -843,7 +859,7 @@ tng_function_status tng_first_signature_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_last_signature_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_signature_get(const tng_trajectory_t tng_data,
char *signature, const int max_len);
/**
@@ -853,7 +869,7 @@ tng_function_status tng_last_signature_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_last_signature_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_last_signature_set(tng_trajectory_t tng_data,
const char *signature);
/**
@@ -866,7 +882,7 @@ tng_function_status tng_last_signature_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (source string longer than destination string).
*/
-tng_function_status tng_forcefield_name_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get(const tng_trajectory_t tng_data,
char *name, const int max_len);
/**
@@ -876,7 +892,7 @@ tng_function_status tng_forcefield_name_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_forcefield_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set(tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -885,7 +901,7 @@ tng_function_status tng_forcefield_name_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the stride length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_medium_stride_length_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -895,7 +911,7 @@ tng_function_status tng_medium_stride_length_get(const tng_trajectory_t tng_data
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred.
*/
-tng_function_status tng_medium_stride_length_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set(tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -904,7 +920,7 @@ tng_function_status tng_medium_stride_length_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the stride length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_long_stride_length_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -914,7 +930,7 @@ tng_function_status tng_long_stride_length_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred.
*/
-tng_function_status tng_long_stride_length_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set(tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -923,7 +939,7 @@ tng_function_status tng_long_stride_length_set(tng_trajectory_t tng_data,
* @param len is pointing to a value set to the file length.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get(const tng_trajectory_t tng_data,
int64_t *len);
/**
@@ -933,7 +949,7 @@ tng_function_status tng_input_file_len_get(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred (could not find last frame set).
*/
-tng_function_status tng_num_frames_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -944,7 +960,7 @@ tng_function_status tng_num_frames_get(const tng_trajectory_t tng_data,
* the number of particles in the current frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_particles_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_particles_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -955,7 +971,7 @@ tng_function_status tng_num_particles_get(const tng_trajectory_t tng_data,
* the total number of molecules in the current frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_molecules_get(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_num_molecules_get(const tng_trajectory_t tng_data,
int64_t *n);
/**
@@ -965,7 +981,7 @@ tng_function_status tng_num_molecules_get(const tng_trajectory_t tng_data,
* @param n is pointing to a value set to the number of frames per frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_frames_per_frame_set_get
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_get
(const tng_trajectory_t tng_data,
int64_t *n);
@@ -979,7 +995,7 @@ tng_function_status tng_num_frames_per_frame_set_get
* betfore creating any frame sets.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_num_frames_per_frame_set_set
+tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set
(const tng_trajectory_t tng_data,
const int64_t n);
@@ -991,7 +1007,7 @@ tng_function_status tng_num_frames_per_frame_set_set
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_num_frame_sets_get
+tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
(const tng_trajectory_t tng_data,
int64_t *n);
@@ -1002,7 +1018,7 @@ tng_function_status tng_num_frame_sets_get
* the found frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_current_frame_set_get
+tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get
(tng_trajectory_t tng_data,
tng_trajectory_frame_set_t *frame_set_p);
@@ -1015,7 +1031,7 @@ tng_function_status tng_current_frame_set_get
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_nr_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find(tng_trajectory_t tng_data,
const int64_t nr);
/**
@@ -1027,7 +1043,7 @@ tng_function_status tng_frame_set_nr_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
const int64_t frame);
/**
@@ -1038,7 +1054,7 @@ tng_function_status tng_frame_set_of_frame_find(tng_trajectory_t tng_data,
* @param pos is pointing to a value set to the file position.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_next_frame_set_file_pos_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_next_frame_set_file_pos_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *pos);
@@ -1051,7 +1067,7 @@ tng_function_status tng_frame_set_next_frame_set_file_pos_get
* @param pos is pointing to a value set to the file position.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_prev_frame_set_file_pos_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_prev_frame_set_file_pos_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *pos);
@@ -1064,7 +1080,7 @@ tng_function_status tng_frame_set_prev_frame_set_file_pos_get
* @param last_frame is set to the last frame of the frame set.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_frame_set_frame_range_get
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_frame_range_get
(const tng_trajectory_t tng_data,
const tng_trajectory_frame_set_t frame_set,
int64_t *first_frame,
@@ -1077,7 +1093,7 @@ tng_function_status tng_frame_set_frame_range_get
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_init(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_init(const tng_trajectory_t tng_data,
tng_molecule_t molecule);
/**
@@ -1089,7 +1105,7 @@ tng_function_status tng_molecule_init(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_destroy(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy(const tng_trajectory_t tng_data,
tng_molecule_t molecule);
/**
@@ -1100,7 +1116,7 @@ tng_function_status tng_molecule_destroy(const tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_add(tng_trajectory_t tng_data,
const char *name,
tng_molecule_t *molecule);
@@ -1112,7 +1128,7 @@ tng_function_status tng_molecule_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *new_name);
@@ -1124,7 +1140,7 @@ tng_function_status tng_molecule_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_molecule_cnt_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get(tng_trajectory_t tng_data,
tng_molecule_t molecule,
int64_t *cnt);
@@ -1136,9 +1152,9 @@ tng_function_status tng_molecule_cnt_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set(tng_trajectory_t tng_data,
tng_molecule_t molecule,
- int64_t cnt);
+ const int64_t cnt);
/**
* @brief Find a chain in a molecule.
@@ -1154,7 +1170,7 @@ tng_function_status tng_molecule_cnt_set(tng_trajectory_t tng_data,
* @details If name is an empty string and id is -1 the first chain will be
* found.
*/
-tng_function_status tng_molecule_chain_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *name,
int64_t id,
@@ -1169,7 +1185,7 @@ tng_function_status tng_molecule_chain_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_molecule_chain_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add(tng_trajectory_t tng_data,
tng_molecule_t molecule,
const char *name,
tng_chain_t *chain);
@@ -1182,7 +1198,7 @@ tng_function_status tng_molecule_chain_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_chain_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_name_set(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *new_name);
@@ -1196,7 +1212,7 @@ tng_function_status tng_chain_name_set(tng_trajectory_t tng_data,
* residue is not found.
* @details If name is an empty string the first residue will be found.
*/
-tng_function_status tng_chain_residue_find(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *name,
int64_t id,
@@ -1211,7 +1227,7 @@ tng_function_status tng_chain_residue_find(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_chain_residue_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add(tng_trajectory_t tng_data,
tng_chain_t chain,
const char *name,
tng_residue_t *residue);
@@ -1224,7 +1240,7 @@ tng_function_status tng_chain_residue_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_residue_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_residue_name_set(tng_trajectory_t tng_data,
tng_residue_t residue,
const char *new_name);
@@ -1238,7 +1254,7 @@ tng_function_status tng_residue_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_residue_atom_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add(tng_trajectory_t tng_data,
tng_residue_t residue,
const char *atom_name,
const char *atom_type,
@@ -1252,7 +1268,7 @@ tng_function_status tng_residue_atom_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_atom_name_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_atom_name_set(tng_trajectory_t tng_data,
tng_atom_t atom,
const char *new_name);
@@ -1264,7 +1280,7 @@ tng_function_status tng_atom_name_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_atom_type_set(tng_trajectory_t tng_data,
tng_atom_t atom,
const char *new_type);
@@ -1278,7 +1294,7 @@ tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_molecule_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1294,7 +1310,7 @@ tng_function_status tng_molecule_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_chain_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1310,7 +1326,7 @@ tng_function_status tng_chain_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_residue_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1326,7 +1342,7 @@ tng_function_status tng_residue_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_atom_name_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
@@ -1342,7 +1358,7 @@ tng_function_status tng_atom_name_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
* has occured.
*/
-tng_function_status tng_atom_type_of_particle_nr_get
+tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *type,
@@ -1367,7 +1383,7 @@ tng_function_status tng_atom_type_of_particle_nr_get
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_mapping_add
+tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
(tng_trajectory_t tng_data,
const int64_t first_particle_number,
const int64_t n_particles,
@@ -1387,7 +1403,7 @@ tng_function_status tng_particle_mapping_add
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_file_headers_read(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_file_headers_read(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1403,7 +1419,7 @@ tng_function_status tng_file_headers_read(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-tng_function_status tng_file_headers_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_file_headers_write(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1422,7 +1438,7 @@ tng_function_status tng_file_headers_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_block_read_next(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_block_read_next(tng_trajectory_t tng_data,
tng_gen_block_t block_data,
const tng_hash_mode hash_mode);
@@ -1439,7 +1455,7 @@ tng_function_status tng_block_read_next(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_read_next(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1454,7 +1470,7 @@ tng_function_status tng_frame_set_read_next(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_write(tng_trajectory_t tng_data,
const tng_hash_mode hash_mode);
/**
@@ -1466,7 +1482,7 @@ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_set_new(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_new(tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames);
@@ -1491,7 +1507,7 @@ tng_function_status tng_frame_set_new(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_block_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_block_add(tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const tng_data_type datatype,
@@ -1526,7 +1542,7 @@ tng_function_status tng_data_block_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_block_add(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add(tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const tng_data_type datatype,
@@ -1554,7 +1570,7 @@ tng_function_status tng_particle_data_block_add(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_data_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_data_write(tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const void *data,
@@ -1579,7 +1595,7 @@ tng_function_status tng_frame_data_write(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write(tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const int64_t val_first_particle,
@@ -1596,7 +1612,7 @@ tng_function_status tng_frame_particle_data_write(tng_trajectory_t tng_data,
* @param type is the data type of the data in the array (e.g. int/float/char).
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_data_values_free(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_values_free(const tng_trajectory_t tng_data,
union data_values **values,
const int64_t n_frames,
const int64_t n_values_per_frame,
@@ -1612,7 +1628,7 @@ tng_function_status tng_data_values_free(const tng_trajectory_t tng_data,
* @param type is the data type of the data in the array (e.g. int/float/char).
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_particle_data_values_free(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free(const tng_trajectory_t tng_data,
union data_values ***values,
const int64_t n_frames,
const int64_t n_particles,
@@ -1638,7 +1654,7 @@ tng_function_status tng_particle_data_values_free(const tng_trajectory_t tng_dat
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_get(tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ***values,
int64_t *n_frames,
@@ -1693,7 +1709,7 @@ tng_function_status tng_data_vector_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_interval_get(tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -1726,7 +1742,7 @@ tng_function_status tng_data_interval_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_get(tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ****values,
int64_t *n_frames,
@@ -1761,7 +1777,7 @@ tng_function_status tng_particle_data_get(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get(tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -1777,7 +1793,7 @@ tng_function_status tng_particle_data_interval_get(tng_trajectory_t tng_data,
must be reserved beforehand.
* @return TNG_SUCCESS (0) if successful.
*/
-tng_function_status tng_time_get_str(const tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_time_get_str(const tng_trajectory_t tng_data,
char *time);
contact: Jan Huwald // Impressum