summaryrefslogtreecommitdiffstats
path: root/test/swmr_common.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-07-22 20:17:42 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-07-22 20:17:42 (GMT)
commitbe4c660148eab2cebbadee134d6afda8df64e092 (patch)
tree54f71b26c53abac7b78ada28b8b2908013d354ee /test/swmr_common.h
parent0c8e622e1acfe4dbf0d8dd25a514a231c08d388d (diff)
downloadhdf5-be4c660148eab2cebbadee134d6afda8df64e092.zip
hdf5-be4c660148eab2cebbadee134d6afda8df64e092.tar.gz
hdf5-be4c660148eab2cebbadee134d6afda8df64e092.tar.bz2
[svn-r17224] Installed SWMR testings.
Tested: amani.
Diffstat (limited to 'test/swmr_common.h')
-rw-r--r--test/swmr_common.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/swmr_common.h b/test/swmr_common.h
new file mode 100644
index 0000000..edf0f3b
--- /dev/null
+++ b/test/swmr_common.h
@@ -0,0 +1,56 @@
+#ifndef __BENCHMARK_COMMON_H
+#define __BENCHMARK_COMMON_H
+
+/* Headers needed */
+
+#define _GNU_SOURCE
+#include <limits.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "hdf5.h"
+
+/* Macros */
+
+#ifndef TRUE
+#define TRUE 1
+#endif /* TRUE */
+#ifndef FALSE
+#define FALSE 0
+#endif /* FALSE */
+
+#define NLEVELS 5
+#define NMAPPING 9
+
+#define FILENAME "swmr_data.h5"
+#define DTYPE_SIZE 150
+
+/* Typedefs */
+
+/* Information about a symbol/dataset */
+typedef struct {
+ char *name; /* Dataset name for symbol */
+ hid_t dsid; /* Dataset ID for symbol */
+ hsize_t nrecords; /* Number of records for the symbol */
+} symbol_info_t;
+
+/* A symbol's record */
+typedef struct {
+ uint64_t rec_id; /* ID for this record (unique in symbol) */
+ uint8_t info[DTYPE_SIZE]; /* "Other" information for this record */
+} symbol_t;
+
+/* Global variables */
+extern symbol_info_t *symbol_info[NLEVELS];
+extern unsigned symbol_count[NLEVELS];
+
+/* Prototypes */
+extern symbol_info_t * choose_dataset(void);
+extern hid_t create_symbol_datatype(void);
+extern int generate_name(char *name_buf, unsigned level, unsigned count);
+extern int generate_symbols(void);
+extern int shutdown_symbols(void);
+
+#endif /* __BENCHMARK_COMMON_H */
+