-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master' into bio
# Conflicts: # include/SZ3/api/impl/SZDispatcher.hpp # include/SZ3/compressor/SZGeneralCompressor.hpp # include/SZ3/decomposition/SZBioMDFrontend.hpp # include/SZ3/decomposition/SZBioMDXtcBasedFrontend.hpp # include/SZ3/encoder/HuffmanEncoder.hpp # include/SZ3/lossless/Lossless_zstd.hpp # include/SZ3/utils/ByteUtil.hpp # include/SZ3/utils/Config.hpp # tools/H5Z-SZ3/src/H5Z_SZ3.cpp # tools/H5Z-SZ3/test/dsz3FromHDF5.cpp # tools/H5Z-SZ3/test/sz3ToHDF5.cpp
- Loading branch information
Showing
60 changed files
with
2,291 additions
and
1,726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef SZ3_SZALGO_HPP | ||
#define SZ3_SZALGO_HPP | ||
|
||
#include "SZ3/compressor/SZGenericCompressor.hpp" | ||
#include "SZ3/decomposition/NoPredictionDecomposition.hpp" | ||
#include "SZ3/quantizer/IntegerQuantizer.hpp" | ||
#include "SZ3/lossless/Lossless_zstd.hpp" | ||
#include "SZ3/encoder/HuffmanEncoder.hpp" | ||
#include "SZ3/utils/Config.hpp" | ||
|
||
namespace SZ3 { | ||
template<class T, uint N> | ||
size_t SZ_compress_nopred(Config &conf, T *data, uchar *cmpData, size_t cmpCap) { | ||
assert(N == conf.N); | ||
assert(conf.cmprAlgo == ALGO_INTERP); | ||
calAbsErrorBound(conf, data); | ||
|
||
auto sz = make_compressor_sz_generic<T, N>( | ||
make_decomposition_noprediction<T, N>(conf, | ||
LinearQuantizer<T>(conf.absErrorBound, conf.quantbinCnt / 2)), | ||
HuffmanEncoder<int>(), | ||
Lossless_zstd()); | ||
return sz->compress(conf, data, cmpData, cmpCap); | ||
// return cmpData; | ||
} | ||
|
||
|
||
template<class T, uint N> | ||
void SZ_decompress_nopred(const Config &conf, const uchar *cmpData, size_t cmpSize, T *decData) { | ||
assert(conf.cmprAlgo == ALGO_INTERP); | ||
auto cmpDataPos = cmpData; | ||
auto sz = make_compressor_sz_generic<T, N>( | ||
make_decomposition_noprediction<T, N>(conf, | ||
LinearQuantizer<T>(conf.absErrorBound, conf.quantbinCnt / 2)), | ||
HuffmanEncoder<int>(), | ||
Lossless_zstd()); | ||
sz->decompress(conf, cmpDataPos, cmpSize, decData); | ||
} | ||
|
||
|
||
} | ||
#endif |
Oops, something went wrong.