source: thirdparty/SZ/sz/include/TightDataPointStorageD.h @ 2c47b73

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

more work on adding SZ (latest version)

  • Property mode set to 100644
RevLine 
[2c47b73]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        int stateNum;
27        int allNodes;
28
29        size_t exactDataNum;
30        double reservedValue;
31       
32        unsigned char* rtypeArray;
33        size_t rtypeArray_size;
34       
35        unsigned char* typeArray; //its size is dataSeriesLength/4 (or xxx/4+1)
36        size_t typeArray_size;
37       
38        unsigned char* leadNumArray; //its size is exactDataNum/4 (or exactDataNum/4+1)
39        size_t leadNumArray_size;
40       
41        unsigned char* exactMidBytes;
42        size_t exactMidBytes_size;
43       
44        unsigned char* residualMidBits;
45        size_t residualMidBits_size;
46       
47        unsigned int intervals;
48       
49        unsigned char isLossless; //a mark to denote whether it's lossless compression (1 is yes, 0 is no)
50       
51        size_t segment_size;
52       
53        unsigned char* pwrErrBoundBytes;
54        int pwrErrBoundBytes_size;
55} TightDataPointStorageD;
56
57void new_TightDataPointStorageD_Empty(TightDataPointStorageD **self);
58int new_TightDataPointStorageD_fromFlatBytes(TightDataPointStorageD **self, unsigned char* flatBytes, size_t flatBytesLength);
59
60void new_TightDataPointStorageD(TightDataPointStorageD **self, 
61                size_t dataSeriesLength, size_t exactDataNum, 
62                int* type, unsigned char* exactMidBytes, size_t exactMidBytes_size,
63                unsigned char* leadNumIntArray,  //leadNumIntArray contains readable numbers....
64                unsigned char* resiMidBits, size_t resiMidBits_size,
65                unsigned char resiBitLength, 
66                double realPrecision, double medianValue, char reqLength, unsigned int intervals, 
67                unsigned char* pwrErrBoundBytes, size_t pwrErrBoundBytes_size, unsigned char radExpo);
68
69void new_TightDataPointStorageD2(TightDataPointStorageD **self, 
70                size_t dataSeriesLength, size_t exactDataNum, 
71                int* type, unsigned char* exactMidBytes, size_t exactMidBytes_size,
72                unsigned char* leadNumIntArray,  //leadNumIntArray contains readable numbers....
73                unsigned char* resiMidBits, size_t resiMidBits_size,
74                unsigned char* resiBitLength, size_t resiBitLengthSize,
75                double realPrecision, double medianValue, char reqLength, unsigned int intervals,
76                unsigned char* pwrErrBoundBytes, size_t pwrErrBoundBytes_size, unsigned char radExpo);
77
78void convertTDPStoBytes_double(TightDataPointStorageD* tdps, unsigned char* bytes, unsigned char* dsLengthBytes, unsigned char sameByte);
79void convertTDPStoBytes_double_reserve(TightDataPointStorageD* tdps, unsigned char* bytes, unsigned char* dsLengthBytes, unsigned char sameByte);
80void convertTDPStoFlatBytes_double(TightDataPointStorageD *tdps, unsigned char** bytes, size_t *size);
81void convertTDPStoFlatBytes_double_args(TightDataPointStorageD *tdps, unsigned char* bytes, size_t *size);
82
83void free_TightDataPointStorageD(TightDataPointStorageD *tdps);
84void free_TightDataPointStorageD2(TightDataPointStorageD *tdps);
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* ----- #ifndef _TightDataPointStorageD_H  ----- */
Note: See TracBrowser for help on using the repository browser.