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

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

more work on adding SZ (latest version)

  • Property mode set to 100644
Line 
1/**
2 *  @file TightDataPointStorageI.h
3 *  @author Sheng Di and Dingwen Tao
4 *  @date Aug, 2017
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 _TightDataPointStorageI_H
11#define _TightDataPointStorageI_H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include <stdio.h>
18
19typedef struct TightDataPointStorageI
20{
21        size_t dataSeriesLength;
22        int allSameData;
23        double realPrecision; //it's used as the pwrErrBoundRatio when errBoundMode==PW_REL
24        size_t exactDataNum;
25        long minValue;
26        int exactByteSize;
27        int dataTypeSize; //the size of data type, e.g., it's 4 when data type is int32_t
28       
29        int stateNum;
30        int allNodes;
31       
32        unsigned char* typeArray; //its size is dataSeriesLength/4 (or xxx/4+1)
33        size_t typeArray_size;
34       
35        unsigned char* exactDataBytes;
36        size_t exactDataBytes_size;
37       
38        unsigned int intervals; //quantization_intervals
39       
40        unsigned char isLossless; //a mark to denote whether it's lossless compression (1 is yes, 0 is no)
41
42} TightDataPointStorageI;
43
44int computeRightShiftBits(int exactByteSize, int dataType);
45int convertDataTypeSizeCode(int dataTypeSizeCode);
46int convertDataTypeSize(int dataTypeSize);
47
48void new_TightDataPointStorageI_Empty(TightDataPointStorageI **self);
49int new_TightDataPointStorageI_fromFlatBytes(TightDataPointStorageI **self, unsigned char* flatBytes, size_t flatBytesLength);
50void new_TightDataPointStorageI(TightDataPointStorageI **self,
51                size_t dataSeriesLength, size_t exactDataNum, int byteSize, 
52                int* type, unsigned char* exactDataBytes, size_t exactDataBytes_size,
53                double realPrecision, long minValue, int intervals, int dataType);
54
55void convertTDPStoBytes_int(TightDataPointStorageI* tdps, unsigned char* bytes, unsigned char* dsLengthBytes, unsigned char sameByte);
56void convertTDPStoFlatBytes_int(TightDataPointStorageI *tdps, unsigned char** bytes, size_t *size);
57void convertTDPStoFlatBytes_int_args(TightDataPointStorageI *tdps, unsigned char* bytes, size_t *size);
58void free_TightDataPointStorageI(TightDataPointStorageI *tdps);
59void free_TightDataPointStorageI2(TightDataPointStorageI *tdps);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* ----- #ifndef _TightDataPointStorageI_H  ----- */
Note: See TracBrowser for help on using the repository browser.