diff --git a/CMakeLists.txt b/CMakeLists.txt index 584debd75676962df90c73b941fa14d6ed1e641f..6f50aca0797cb2d3a2b61796d43137fb417f76ee 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) IF (CMAKE_VERSION VERSION_LESS 3.0) PROJECT(TDengine CXX) SET(PROJECT_VERSION_MAJOR "${LIB_MAJOR_VERSION}") - SET(PROJECT_VERSION_MINOR "${:_MINOR_VERSION}") + SET(PROJECT_VERSION_MINOR "${LIB_MINOR_VERSION}") SET(PROJECT_VERSION_PATCH "${LIB_PATCH_VERSION}") SET(PROJECT_VERSION "${LIB_VERSION_STRING}") ELSE () @@ -43,14 +43,11 @@ INCLUDE(cmake/version.inc) INCLUDE(cmake/install.inc) IF (CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Wall ") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -Wall") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Wall -Wshadow -Werror") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -Wall -Wshadow -Werror") ENDIF () MESSAGE(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") MESSAGE(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") -MESSAGE(STATUS "COMMON_FLAGS: ${COMMON_FLAGS}") - - ADD_SUBDIRECTORY(deps) ADD_SUBDIRECTORY(src) diff --git a/cmake/define.inc b/cmake/define.inc index 30bf4e52c742f3cdb8eec1044b1a0ae5fd57944d..a15e0aecbb2d30ad2ec7aa1c5761c9d2a40f3323 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -57,7 +57,7 @@ IF (TD_LINUX_64) ADD_DEFINITIONS(-D_M_X64) ADD_DEFINITIONS(-D_TD_LINUX_64) MESSAGE(STATUS "linux64 is defined") - SET(COMMON_FLAGS "-Wall -fPIC -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") ADD_DEFINITIONS(-DUSE_LIBICONV) IF (JEMALLOC_ENABLED) @@ -70,7 +70,7 @@ IF (TD_LINUX_32) ADD_DEFINITIONS(-D_TD_LINUX_32) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "linux32 is defined") - SET(COMMON_FLAGS "-Wall -Werror -fPIC -fsigned-char -munaligned-access -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -fsigned-char -munaligned-access -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") ENDIF () IF (TD_ARM_64) @@ -78,7 +78,7 @@ IF (TD_ARM_64) ADD_DEFINITIONS(-D_TD_ARM_) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "arm64 is defined") - SET(COMMON_FLAGS "-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") ENDIF () IF (TD_ARM_32) @@ -86,7 +86,7 @@ IF (TD_ARM_32) ADD_DEFINITIONS(-D_TD_ARM_) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "arm32 is defined") - SET(COMMON_FLAGS "-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types ") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types ") ENDIF () IF (TD_MIPS_64) @@ -94,7 +94,7 @@ IF (TD_MIPS_64) ADD_DEFINITIONS(-D_TD_MIPS_64) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "mips64 is defined") - SET(COMMON_FLAGS "-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") ENDIF () IF (TD_MIPS_32) @@ -102,7 +102,7 @@ IF (TD_MIPS_32) ADD_DEFINITIONS(-D_TD_MIPS_32) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "mips32 is defined") - SET(COMMON_FLAGS "-Wall -Werror -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") ENDIF () IF (TD_APLHINE) @@ -147,7 +147,7 @@ IF (TD_DARWIN_64) ADD_DEFINITIONS(-D_REENTRANT -D__USE_POSIX -D_LIBC_REENTRANT) ADD_DEFINITIONS(-DUSE_LIBICONV) MESSAGE(STATUS "darwin64 is defined") - SET(COMMON_FLAGS "-Wall -Werror -Wno-missing-braces -fPIC -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") + SET(COMMON_FLAGS "-std=gnu99 -Wall -Werror -Wno-missing-braces -fPIC -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") IF (TD_MEMORY_SANITIZER) SET(DEBUG_FLAGS "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -O0 -g3 -DDEBUG") ELSE () diff --git a/cmake/env.inc b/cmake/env.inc index fa15ec6aee01a619139417fceb21b3a71bd96364..6c1ce8fd89847b41f0cdb595384c2772823c7885 100755 --- a/cmake/env.inc +++ b/cmake/env.inc @@ -35,13 +35,13 @@ ENDIF () # Set compiler options SET(COMMON_C_FLAGS "${COMMON_FLAGS} -std=gnu99") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS} ${DEBUG_FLAGS}") -SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_C_FLAGS} ${RELEASE_FLAGS}") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_FLAGS} ${DEBUG_FLAGS}") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_FLAGS} ${RELEASE_FLAGS}") # Set c++ compiler options -SET(COMMON_CXX_FLAGS "${COMMON_FLAGS} -std=c++11 -Wno-unused-function") -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS} ${DEBUG_FLAGS}") -SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS} ${RELEASE_FLAGS}") +# SET(COMMON_CXX_FLAGS "${COMMON_FLAGS} -std=c++11") +# SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS} ${DEBUG_FLAGS}") +# SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS} ${RELEASE_FLAGS}") IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") SET(CMAKE_BUILD_TYPE "Debug") diff --git a/cmake/version.inc b/cmake/version.inc index 134f09f1796e8a78186900f075285f1f438750fd..ed8e7a156cc8fffd231889932940d4ff68614102 100755 --- a/cmake/version.inc +++ b/cmake/version.inc @@ -4,7 +4,7 @@ PROJECT(TDengine) IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "2.1.3.0") + SET(TD_VER_NUMBER "2.1.1.0") ENDIF () IF (DEFINED VERCOMPATIBLE) diff --git a/deps/SZ/CMakeLists.txt b/deps/SZ/CMakeLists.txt index a265ad1728e0b8166a11a962657434cc4f0c7de7..06afefda6532310943bcb3e6000f736da013dce6 100644 --- a/deps/SZ/CMakeLists.txt +++ b/deps/SZ/CMakeLists.txt @@ -16,8 +16,12 @@ AUX_SOURCE_DIRECTORY(zstd/deprecated SRC6) AUX_SOURCE_DIRECTORY(zstd/legacy SRC7) AUX_SOURCE_DIRECTORY(zstd/dictBuilder SRC8) + + # archive ADD_LIBRARY(SZ STATIC ${SRC1} ${SRC2} ${SRC3} ${SRC4} ${SRC5} ${SRC6} ${SRC7} ${SRC8}) +SET_TARGET_PROPERTIES(SZ PROPERTIES COMPILE_FLAGS -w) + diff --git a/deps/SZ/sz/include/defines.h b/deps/SZ/sz/include/defines.h index 471387ae109bdb6df23781f9866efcc4715fae8b..aea3171c88eeaff30f5ea57d945a71730eb10e83 100644 --- a/deps/SZ/sz/include/defines.h +++ b/deps/SZ/sz/include/defines.h @@ -26,7 +26,7 @@ #define MIN_NUM_OF_ELEMENTS 0 //if the # elements <= 20, skip the compression -#define ABS 0 +#define SZ_ABS 0 #define REL 1 #define VR_REL 1 //alternative name to REL #define ABS_AND_REL 2 @@ -87,7 +87,7 @@ #define SZ_TERR -3 //wrong data type (should be only float or double) #define SZ_DERR -4 //dimension error #define SZ_MERR -5 //sz_mode error -#define SZ_BERR -6 //bound-mode error (should be only ABS, REL, ABS_AND_REL, ABS_OR_REL, or PW_REL) +#define SZ_BERR -6 //bound-mode error (should be only SZ_ABS, REL, ABS_AND_REL, ABS_OR_REL, or PW_REL) #define SZ_MAINTAIN_VAR_DATA 0 #define SZ_DESTROY_WHOLE_VARSET 1 diff --git a/deps/SZ/sz/include/pub.h b/deps/SZ/sz/include/pub.h index ef849d2d5646a8cf4e9ae3be20cc6c7bf23b7a5c..c30921c5f5f940f1d664b5e13b3a966313bb07e9 100644 --- a/deps/SZ/sz/include/pub.h +++ b/deps/SZ/sz/include/pub.h @@ -32,7 +32,7 @@ typedef struct sz_params float predThreshold; // 2 bytes int szMode; //* 0 (best speed) or 1 (better compression with Zstd/Gzip) or 3 temporal-dimension based compression int gzipMode; //* four options: Z_NO_COMPRESSION, or Z_BEST_SPEED, Z_BEST_COMPRESSION, Z_DEFAULT_COMPRESSION - int errorBoundMode; //4bits (0.5byte), //ABS, REL, ABS_AND_REL, or ABS_OR_REL, PSNR, or PW_REL, PSNR + int errorBoundMode; //4bits (0.5byte), //SZ_ABS, REL, ABS_AND_REL, or ABS_OR_REL, PSNR, or PW_REL, PSNR double absErrBound; //absolute error bound double relBoundRatio; //value range based relative error bound ratio double psnr; //PSNR diff --git a/deps/SZ/sz/src/ByteToolkit.c b/deps/SZ/sz/src/ByteToolkit.c index a715d4f252947c82f3bdeac958aab515453b121a..edcf3a6d684afead86b8091a5ac0bf06b5e652e7 100644 --- a/deps/SZ/sz/src/ByteToolkit.c +++ b/deps/SZ/sz/src/ByteToolkit.c @@ -915,7 +915,7 @@ void convertSZParamsToBytes(sz_params* params, unsigned char* result) //result[9]: rel_bound_ratio or pwr_err_bound//4 bytes switch(params->errorBoundMode) { - case ABS: + case SZ_ABS: floatToBytes(&result[6], (float)(params->absErrBound)); //big_endian memset(&result[10], 0, 4); break; @@ -1006,7 +1006,7 @@ void convertBytesToSZParams(unsigned char* bytes, sz_params* params, sz_exedata* switch(params->errorBoundMode) { - case ABS: + case SZ_ABS: params->absErrBound = bytesToFloat(&bytes[6]); break; case REL: diff --git a/deps/SZ/sz/src/TightDataPointStorageD.c b/deps/SZ/sz/src/TightDataPointStorageD.c index a9c94a5312cf48c4ba6f559491e13cd9cf0957db..bad891cdfc193b5ee701194e866c5676c9637d32 100644 --- a/deps/SZ/sz/src/TightDataPointStorageD.c +++ b/deps/SZ/sz/src/TightDataPointStorageD.c @@ -76,7 +76,7 @@ int new_TightDataPointStorageD_fromFlatBytes(TightDataPointStorageD **this, unsi exe_params->SZ_SIZE_TYPE = ((sameRByte & 0x40)>>6)==1?8:4; pde_params->protectValueRange = (sameRByte & 0x04)>>2; pde_params->accelerate_pw_rel_compression = (sameRByte & 0x08) >> 3; - int errorBoundMode = ABS; + int errorBoundMode = SZ_ABS; if(isPW_REL) { errorBoundMode = PW_REL; diff --git a/deps/SZ/sz/src/TightDataPointStorageF.c b/deps/SZ/sz/src/TightDataPointStorageF.c index eed001fee097047a4bdaa9942bc040dd9cd8a86f..2a236ab36bbf83b4f53dbf5b17688df14265e989 100644 --- a/deps/SZ/sz/src/TightDataPointStorageF.c +++ b/deps/SZ/sz/src/TightDataPointStorageF.c @@ -80,7 +80,7 @@ int new_TightDataPointStorageF_fromFlatBytes(TightDataPointStorageF **this, unsi pde_params->accelerate_pw_rel_compression = (sameRByte & 0x08) >> 3;//0000,1000 - int errorBoundMode = ABS; + int errorBoundMode = SZ_ABS; if(isPW_REL) { errorBoundMode = PW_REL; diff --git a/deps/SZ/sz/src/conf.c b/deps/SZ/sz/src/conf.c index 98d00d06ea0d7da8617ab70743fabeca81c028da..cfd918bf76766e29c0277fee166c6c7e5c22b642 100644 --- a/deps/SZ/sz/src/conf.c +++ b/deps/SZ/sz/src/conf.c @@ -116,7 +116,7 @@ int SZ_ReadConf(const char* sz_cfgFile) { else confparams_cpr->gzipMode = 1; //high speed mode - confparams_cpr->errorBoundMode = ABS; + confparams_cpr->errorBoundMode = SZ_ABS; confparams_cpr->psnr = 90; confparams_cpr->absErrBound = 1E-10; confparams_cpr->relBoundRatio = 1E-10; @@ -316,7 +316,7 @@ int SZ_ReadConf(const char* sz_cfgFile) { return SZ_NSCS; } else if(strcmp(errBoundMode,"ABS")==0||strcmp(errBoundMode,"abs")==0) - confparams_cpr->errorBoundMode=ABS; + confparams_cpr->errorBoundMode=SZ_ABS; else if(strcmp(errBoundMode, "REL")==0||strcmp(errBoundMode,"rel")==0) confparams_cpr->errorBoundMode=REL; else if(strcmp(errBoundMode, "VR_REL")==0||strcmp(errBoundMode, "vr_rel")==0) diff --git a/deps/SZ/sz/src/dataCompression.c b/deps/SZ/sz/src/dataCompression.c index 0051c542158010f1cfd9896b664a39a0181eced1..c630659d389a3f8f7562a15e50e807a85e5dc5ff 100644 --- a/deps/SZ/sz/src/dataCompression.c +++ b/deps/SZ/sz/src/dataCompression.c @@ -286,7 +286,7 @@ double getRealPrecision_double(double valueRangeSize, int errBoundMode, double a { int state = SZ_SCES; double precision = 0; - if(errBoundMode==ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) + if(errBoundMode==SZ_ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) precision = absErrBound; else if(errBoundMode==REL||errBoundMode==REL_OR_PW_REL||errBoundMode==REL_AND_PW_REL) precision = relBoundRatio*valueRangeSize; @@ -309,7 +309,7 @@ double getRealPrecision_float(float valueRangeSize, int errBoundMode, double abs { int state = SZ_SCES; double precision = 0; - if(errBoundMode==ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) + if(errBoundMode==SZ_ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) precision = absErrBound; else if(errBoundMode==REL||errBoundMode==REL_OR_PW_REL||errBoundMode==REL_AND_PW_REL) precision = relBoundRatio*valueRangeSize; @@ -332,7 +332,7 @@ double getRealPrecision_int(long valueRangeSize, int errBoundMode, double absErr { int state = SZ_SCES; double precision = 0; - if(errBoundMode==ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) + if(errBoundMode==SZ_ABS||errBoundMode==ABS_OR_PW_REL||errBoundMode==ABS_AND_PW_REL) precision = absErrBound; else if(errBoundMode==REL||errBoundMode==REL_OR_PW_REL||errBoundMode==REL_AND_PW_REL) precision = relBoundRatio*valueRangeSize; diff --git a/deps/SZ/sz/src/exafelSZ.c b/deps/SZ/sz/src/exafelSZ.c index cc4e52bf508fe1eddf06ea827f9fa59ae38e27e0..f90d8ce74a764c84d4d17ebc4e365262afd788cf 100644 --- a/deps/SZ/sz/src/exafelSZ.c +++ b/deps/SZ/sz/src/exafelSZ.c @@ -246,15 +246,15 @@ unsigned char * exafelSZ_Compress(void* _pr, switch(pr->szDim){ case 1: // szComp=sz_compress_3D(binnedData, 0, 0, nEvents * panels * pr->binnedRows * pr->binnedCols, pr->tolerance, szCompressedSize); //1D - szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, ABS, pr->tolerance, 0, 0, 0, 0,0,0, nEvents * panels * pr->binnedRows * pr->binnedCols); + szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, SZ_ABS, pr->tolerance, 0, 0, 0, 0,0,0, nEvents * panels * pr->binnedRows * pr->binnedCols); break; case 2: // szComp=sz_compress_3D(binnedData, 0, nEvents * panels * pr->binnedRows, pr->binnedCols, pr->tolerance, szCompressedSize); //2D - szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, ABS, pr->tolerance, 0, 0, 0, 0,0, nEvents * panels * pr->binnedRows, pr->binnedCols); + szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, SZ_ABS, pr->tolerance, 0, 0, 0, 0,0, nEvents * panels * pr->binnedRows, pr->binnedCols); break; case 3: // szComp=sz_compress_3D(binnedData, nEvents * panels, pr->binnedRows, pr->binnedCols, pr->tolerance, szCompressedSize); //3D - szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, ABS, pr->tolerance, 0, 0, 0, 0, nEvents * panels, pr->binnedRows, pr->binnedCols); + szComp=SZ_compress_args(SZ_FLOAT, binnedData, &szCompressedSize, SZ_ABS, pr->tolerance, 0, 0, 0, 0, nEvents * panels, pr->binnedRows, pr->binnedCols); break; default: printf("ERROR: Wrong szDim : %d It must be 1,2 or 3.\n",(int)pr->szDim); diff --git a/deps/SZ/sz/src/sz_double.c b/deps/SZ/sz/src/sz_double.c index 458f8753691b065bdc3536f08a2f5b343c2ee103..c1bc32d70d639236d71e1ea478a5c26f60ebda95 100644 --- a/deps/SZ/sz/src/sz_double.c +++ b/deps/SZ/sz/src/sz_double.c @@ -729,12 +729,12 @@ int errBoundMode, double absErr_Bound, double relBoundRatio, double pwRelBoundRa if(confparams_cpr->errorBoundMode==PSNR) { - confparams_cpr->errorBoundMode = ABS; + confparams_cpr->errorBoundMode = SZ_ABS; realPrecision = confparams_cpr->absErrBound = computeABSErrBoundFromPSNR(confparams_cpr->psnr, (double)confparams_cpr->predThreshold, valueRangeSize); } else if(confparams_cpr->errorBoundMode==NORM) //norm error = sqrt(sum((xi-xi_)^2)) { - confparams_cpr->errorBoundMode = ABS; + confparams_cpr->errorBoundMode = SZ_ABS; realPrecision = confparams_cpr->absErrBound = computeABSErrBoundFromNORM_ERR(confparams_cpr->normErr, dataLength); //printf("realPrecision=%lf\n", realPrecision); } diff --git a/deps/SZ/sz/src/sz_float.c b/deps/SZ/sz/src/sz_float.c index b0721cf27a0eac475767dd22c6cb77fce572bbf6..dd6db0747faaf3ab79f19a094ec46adf7be8af2e 100644 --- a/deps/SZ/sz/src/sz_float.c +++ b/deps/SZ/sz/src/sz_float.c @@ -847,13 +847,13 @@ int errBoundMode, double absErr_Bound, double relBoundRatio, double pwRelBoundRa if(confparams_cpr->errorBoundMode==PSNR) { - confparams_cpr->errorBoundMode = ABS; + confparams_cpr->errorBoundMode = SZ_ABS; realPrecision = confparams_cpr->absErrBound = computeABSErrBoundFromPSNR(confparams_cpr->psnr, (double)confparams_cpr->predThreshold, (double)valueRangeSize); //printf("realPrecision=%lf\n", realPrecision); } else if(confparams_cpr->errorBoundMode==NORM) //norm error = sqrt(sum((xi-xi_)^2)) { - confparams_cpr->errorBoundMode = ABS; + confparams_cpr->errorBoundMode = SZ_ABS; realPrecision = confparams_cpr->absErrBound = computeABSErrBoundFromNORM_ERR(confparams_cpr->normErr, dataLength); //printf("realPrecision=%lf\n", realPrecision); } @@ -1916,7 +1916,7 @@ unsigned char * SZ_compress_float_1D_MDQ_decompression_random_access_with_blocke result_pos += sizeof(size_t); // record blockwise unpred data size_t compressed_blockwise_unpred_count_size; - unsigned char * compressed_bw_unpred_count = SZ_compress_args(SZ_INT32, blockwise_unpred_count, &compressed_blockwise_unpred_count_size, ABS, 0.5, 0, 0, 0, 0, 0, 0, num_blocks); + unsigned char * compressed_bw_unpred_count = SZ_compress_args(SZ_INT32, blockwise_unpred_count, &compressed_blockwise_unpred_count_size, SZ_ABS, 0.5, 0, 0, 0, 0, 0, 0, num_blocks); memcpy(result_pos, &compressed_blockwise_unpred_count_size, sizeof(size_t)); result_pos += sizeof(size_t); memcpy(result_pos, compressed_bw_unpred_count, compressed_blockwise_unpred_count_size); @@ -1947,7 +1947,7 @@ unsigned char * SZ_compress_float_1D_MDQ_decompression_random_access_with_blocke type_array_block_size_pos ++; } size_t compressed_type_array_block_size; - unsigned char * compressed_type_array_block = SZ_compress_args(SZ_UINT16, type_array_block_size, &compressed_type_array_block_size, ABS, 0.5, 0, 0, 0, 0, 0, 0, num_blocks); + unsigned char * compressed_type_array_block = SZ_compress_args(SZ_UINT16, type_array_block_size, &compressed_type_array_block_size, SZ_ABS, 0.5, 0, 0, 0, 0, 0, 0, num_blocks); memcpy(result_pos, &compressed_type_array_block_size, sizeof(size_t)); result_pos += sizeof(size_t); memcpy(result_pos, compressed_type_array_block, compressed_type_array_block_size);