source: thirdparty/SZ/sz/include/TightDataPointStorageD.h @ 9ee2ce3

Revision 9ee2ce3, 3.3 KB checked in by Hal Finkel <hfinkel@…>, 6 years ago (diff)

importing new SZ files

  • Property mode set to 100644
Line 
1/**
2 *  @file TightDataPointStorageD.h
3 *  @author Sheng Di
4 *  @date April, 2016
5 *  @brief Header file for the tight data point storage (TDPS).
6 *  (C) 2016 by Mathematics and Computer Science (MCS), Argonne National Laboratory.
7 *      See COPYRIGHT in top-level directory.
8 */
9
10#ifndef _TightDataPointStorageD_H
11#define _TightDataPointStorageD_H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct TightDataPointStorageD
18{
19        size_t dataSeriesLength;
20        int allSameData;
21        double realPrecision;
22        double medianValue;
23        char reqLength; 
24        char radExpo; //used to compute reqLength based on segmented precisions in "pw_rel_compression"
25
26        double minLogValue;
27
28        int stateNum;
29        int allNodes;
30
31        size_t exactDataNum;
32        double reservedValue;
33       
34        unsigned char* rtypeArray;
35        size_t rtypeArray_size;
36       
37        unsigned char* typeArray; //its size is dataSeriesLength/4 (or xxx/4+1)
38        size_t typeArray_size;
39       
40        unsigned char* leadNumArray; //its size is exactDataNum/4 (or exactDataNum/4+1)
41        size_t leadNumArray_size;
42       
43        unsigned char* exactMidBytes;
44        size_t exactMidBytes_size;
45       
46        unsigned char* residualMidBits;
47        size_t residualMidBits_size;
48       
49        unsigned int intervals;
50       
51        unsigned char isLossless; //a mark to denote whether it's lossless compression (1 is yes, 0 is no)
52       
53        size_t segment_size;
54       
55        unsigned char* pwrErrBoundBytes;
56        int pwrErrBoundBytes_size;
57               
58        unsigned char* raBytes;
59        size_t raBytes_size;
60       
61} TightDataPointStorageD;
62
63void new_TightDataPointStorageD_Empty(TightDataPointStorageD **self);
64int new_TightDataPointStorageD_fromFlatBytes(TightDataPointStorageD **self, unsigned char* flatBytes, size_t flatBytesLength);
65
66void new_TightDataPointStorageD(TightDataPointStorageD **self, 
67                size_t dataSeriesLength, size_t exactDataNum, 
68                int* type, unsigned char* exactMidBytes, size_t exactMidBytes_size,
69                unsigned char* leadNumIntArray,  //leadNumIntArray contains readable numbers....
70                unsigned char* resiMidBits, size_t resiMidBits_size,
71                unsigned char resiBitLength, 
72                double realPrecision, double medianValue, char reqLength, unsigned int intervals, 
73                unsigned char* pwrErrBoundBytes, size_t pwrErrBoundBytes_size, unsigned char radExpo);
74
75void new_TightDataPointStorageD2(TightDataPointStorageD **self, 
76                size_t dataSeriesLength, size_t exactDataNum, 
77                int* type, unsigned char* exactMidBytes, size_t exactMidBytes_size,
78                unsigned char* leadNumIntArray,  //leadNumIntArray contains readable numbers....
79                unsigned char* resiMidBits, size_t resiMidBits_size,
80                unsigned char* resiBitLength, size_t resiBitLengthSize,
81                double realPrecision, double medianValue, char reqLength, unsigned int intervals,
82                unsigned char* pwrErrBoundBytes, size_t pwrErrBoundBytes_size, unsigned char radExpo);
83
84void convertTDPStoBytes_double(TightDataPointStorageD* tdps, unsigned char* bytes, unsigned char* dsLengthBytes, unsigned char sameByte);
85void convertTDPStoBytes_double_reserve(TightDataPointStorageD* tdps, unsigned char* bytes, unsigned char* dsLengthBytes, unsigned char sameByte);
86void convertTDPStoFlatBytes_double(TightDataPointStorageD *tdps, unsigned char** bytes, size_t *size);
87void convertTDPStoFlatBytes_double_args(TightDataPointStorageD *tdps, unsigned char* bytes, size_t *size);
88
89void free_TightDataPointStorageD(TightDataPointStorageD *tdps);
90void free_TightDataPointStorageD2(TightDataPointStorageD *tdps);
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* ----- #ifndef _TightDataPointStorageD_H  ----- */
Note: See TracBrowser for help on using the repository browser.