diff --git a/deps/SZ/sz/include/ByteToolkit.h b/deps/SZ/sz/include/ByteToolkit.h index 898c90610a7a5ef51fa8721010446224b267e996..d35fbcf809bcda12dd36e7fc68c59bd062ee9680 100644 --- a/deps/SZ/sz/include/ByteToolkit.h +++ b/deps/SZ/sz/include/ByteToolkit.h @@ -26,8 +26,7 @@ short getExponent_float(float value); short getPrecisionReqLength_float(float precision); short getExponent_double(double value); short getPrecisionReqLength_double(double precision); -unsigned char numberOfLeadingZeros_Int(int i); -unsigned char numberOfLeadingZeros_Long(long i); + float bytesToFloat(unsigned char* bytes); void floatToBytes(unsigned char *b, float num); double bytesToDouble(unsigned char* bytes); diff --git a/deps/SZ/sz/include/dictionary.h b/deps/SZ/sz/include/dictionary.h index 0cf326ade2751b2e759bdaac7d8ac72b5eefcabf..ba5bf2f349cebde275c3bdb77a4c9d2722675e70 100644 --- a/deps/SZ/sz/include/dictionary.h +++ b/deps/SZ/sz/include/dictionary.h @@ -21,7 +21,6 @@ #include #include #include -#include /*--------------------------------------------------------------------------- New types diff --git a/deps/SZ/sz/include/sz.h b/deps/SZ/sz/include/sz.h index d3ffdbf3668b7c282d8f0cf8c22d40d351a3b5a3..9f06c9c5538ce91df5949f97eae36df15c26ad1f 100644 --- a/deps/SZ/sz/include/sz.h +++ b/deps/SZ/sz/include/sz.h @@ -12,7 +12,6 @@ #include #include -#include /* For gettimeofday(), in microseconds */ #include /* For time(), in seconds */ #include "pub.h" #include "CompressElement.h" diff --git a/deps/SZ/sz/src/conf.c b/deps/SZ/sz/src/conf.c index 732cf58d6d3246740b845025d2005a13620cd046..6501f728a17f40121771cc3c2b8fc1ade3108e01 100644 --- a/deps/SZ/sz/src/conf.c +++ b/deps/SZ/sz/src/conf.c @@ -138,7 +138,7 @@ int SZ_ReadConf(const char* sz_cfgFile) { // default option - if(sz_cfgFile == NULL || access(sz_cfgFile, F_OK) != 0) + if(sz_cfgFile == NULL) { dataEndianType = LITTLE_ENDIAN_DATA; setDefaulParams(exe_params, confparams_cpr); @@ -146,12 +146,6 @@ int SZ_ReadConf(const char* sz_cfgFile) { return SZ_SUCCESS; } - if (access(sz_cfgFile, F_OK) != 0) - { - printf("[SZ] Configuration file NOT accessible.\n"); - return SZ_FAILED; - } - //printf("[SZ] Reading SZ configuration file (%s) ...\n", sz_cfgFile); ini = iniparser_load(sz_cfgFile); if (ini == NULL) diff --git a/deps/SZ/sz/src/dataCompression.c b/deps/SZ/sz/src/dataCompression.c index 64d89e1e5cbc8c86adecb206c6e8f4ea089e419a..3c32878bb4b3bb9274fc8c75daa02e8332a3a5a4 100644 --- a/deps/SZ/sz/src/dataCompression.c +++ b/deps/SZ/sz/src/dataCompression.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "sz.h" #include "DynamicByteArray.h" #include "DynamicIntArray.h" diff --git a/deps/SZ/sz/src/dictionary.c b/deps/SZ/sz/src/dictionary.c index 3f0f5cfa63a862fa515e9e2d21674ad61b7c2f6f..242dea2e21449ca0e186ff1c48d33c2b6e77964b 100644 --- a/deps/SZ/sz/src/dictionary.c +++ b/deps/SZ/sz/src/dictionary.c @@ -18,7 +18,6 @@ #include #include #include -#include /** Maximum value size for integers and doubles. */ #define MAXVALSZ 1024 diff --git a/deps/SZ/sz/src/sz.c b/deps/SZ/sz/src/sz.c index 92fd7c27cf79c6608b035cde702fad6bfac1c48d..dcec9670eaf065fe4397665f2e5edeeef6662541 100644 --- a/deps/SZ/sz/src/sz.c +++ b/deps/SZ/sz/src/sz.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "sz.h" #include "CompressElement.h" #include "DynamicByteArray.h" @@ -21,6 +20,7 @@ #include "conf.h" #include "utility.h" + //#include "CurveFillingCompressStorage.h" unsigned char versionNumber = DATA_FROMAT_VER1; @@ -170,14 +170,27 @@ void modulePath(char *buf, int size) pos[1]=0; } +#ifdef WINDOWS +int gettimeofday(struct timeval *tv, struct timezone *tz) { + time_t t; + t = time(NULL); + SYSTEMTIME st; + GetLocalTime(&st); + + tv->tv_sec = (long)t; + tv->tv_usec = st.wMilliseconds * 1000; + + return 0; +} +#else +#include +#endif struct timeval startTime; struct timeval endTime; /* Start and end times */ struct timeval costStart; /*only used for recording the cost*/ double totalCost = 0; - - void cost_start() { totalCost = 0; @@ -201,3 +214,4 @@ void show_rate(int in_len, int out_len) float rate=100*(float)out_len/(float)in_len; printf(" in_len=%d out_len=%d compress rate=%.4f%%\n", in_len, out_len, rate); } + diff --git a/deps/SZ/sz/src/sz_double.c b/deps/SZ/sz/src/sz_double.c index b24f2cb9c1ad9ace8fdcc6ef5d959e21bca19893..e04c6f020505de1fa3063d59ec0c8a8a36ee142b 100644 --- a/deps/SZ/sz/src/sz_double.c +++ b/deps/SZ/sz/src/sz_double.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include "sz.h" #include "CompressElement.h" diff --git a/deps/SZ/sz/src/sz_float.c b/deps/SZ/sz/src/sz_float.c index ef2fd8d504d853c50e21771ce9b651e195b6077a..466e4ee0021b6f0a4efee2783395b9cd0bbc2187 100644 --- a/deps/SZ/sz/src/sz_float.c +++ b/deps/SZ/sz/src/sz_float.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include "sz.h" #include "CompressElement.h"