未验证 提交 550e0fae 编写于 作者: H Hongze Cheng 提交者: GitHub

Merge pull request #7785 from taosdata/compress_float

Compress float
Subproject commit ceda5bf9fcd7836509ac97dcc0056b3f1dd48cc5
Subproject commit 11c1060d4f917dd799ae628b131db5d6a5ef6954
......@@ -712,6 +712,15 @@ void leakTest(){
}
#define DB_CNT 500
void test_same_float(int algo, bool lossy){
float ori = 123.456789123;
float floats [DB_CNT];
for(int i=0; i< DB_CNT; i++){
floats[i] = ori;
}
DoFloat(floats, DB_CNT, algo, lossy);
}
void test_same_double(int algo){
double ori = 3.1415926;
......@@ -721,7 +730,6 @@ void test_same_double(int algo){
}
DoDouble(doubles, DB_CNT, algo);
}
#ifdef TD_TSZ
......@@ -781,6 +789,10 @@ int main(int argc, char *argv[]) {
return 0;
}
if(strcmp(argv[1], "-samef") == 0) {
test_same_float(atoi(argv[2]), true);
return 0;
}
if(strcmp(argv[1], "-samed") == 0) {
test_same_double(atoi(argv[2]));
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册