Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d94ffca3
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d94ffca3
编写于
6月 29, 2021
作者:
T
tickduan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
with -w build success
上级
0f616288
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
41 addition
and
40 deletion
+41
-40
CMakeLists.txt
CMakeLists.txt
+3
-6
cmake/define.inc
cmake/define.inc
+7
-7
cmake/env.inc
cmake/env.inc
+5
-5
cmake/version.inc
cmake/version.inc
+1
-1
deps/SZ/CMakeLists.txt
deps/SZ/CMakeLists.txt
+4
-0
deps/SZ/sz/include/defines.h
deps/SZ/sz/include/defines.h
+2
-2
deps/SZ/sz/include/pub.h
deps/SZ/sz/include/pub.h
+1
-1
deps/SZ/sz/src/ByteToolkit.c
deps/SZ/sz/src/ByteToolkit.c
+2
-2
deps/SZ/sz/src/TightDataPointStorageD.c
deps/SZ/sz/src/TightDataPointStorageD.c
+1
-1
deps/SZ/sz/src/TightDataPointStorageF.c
deps/SZ/sz/src/TightDataPointStorageF.c
+1
-1
deps/SZ/sz/src/conf.c
deps/SZ/sz/src/conf.c
+2
-2
deps/SZ/sz/src/dataCompression.c
deps/SZ/sz/src/dataCompression.c
+3
-3
deps/SZ/sz/src/exafelSZ.c
deps/SZ/sz/src/exafelSZ.c
+3
-3
deps/SZ/sz/src/sz_double.c
deps/SZ/sz/src/sz_double.c
+2
-2
deps/SZ/sz/src/sz_float.c
deps/SZ/sz/src/sz_float.c
+4
-4
未找到文件。
CMakeLists.txt
浏览文件 @
d94ffca3
...
...
@@ -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
)
...
...
cmake/define.inc
浏览文件 @
d94ffca3
...
...
@@ -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
()
...
...
cmake/env.inc
浏览文件 @
d94ffca3
...
...
@@ -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"
)
...
...
cmake/version.inc
浏览文件 @
d94ffca3
...
...
@@ -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
)
...
...
deps/SZ/CMakeLists.txt
浏览文件 @
d94ffca3
...
...
@@ -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
)
deps/SZ/sz/include/defines.h
浏览文件 @
d94ffca3
...
...
@@ -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
...
...
deps/SZ/sz/include/pub.h
浏览文件 @
d94ffca3
...
...
@@ -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
...
...
deps/SZ/sz/src/ByteToolkit.c
浏览文件 @
d94ffca3
...
...
@@ -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
:
...
...
deps/SZ/sz/src/TightDataPointStorageD.c
浏览文件 @
d94ffca3
...
...
@@ -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
;
...
...
deps/SZ/sz/src/TightDataPointStorageF.c
浏览文件 @
d94ffca3
...
...
@@ -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
;
...
...
deps/SZ/sz/src/conf.c
浏览文件 @
d94ffca3
...
...
@@ -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
)
...
...
deps/SZ/sz/src/dataCompression.c
浏览文件 @
d94ffca3
...
...
@@ -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
;
...
...
deps/SZ/sz/src/exafelSZ.c
浏览文件 @
d94ffca3
...
...
@@ -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
);
...
...
deps/SZ/sz/src/sz_double.c
浏览文件 @
d94ffca3
...
...
@@ -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);
}
...
...
deps/SZ/sz/src/sz_float.c
浏览文件 @
d94ffca3
...
...
@@ -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
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录