Skip to content

Commit

Permalink
fix sirius operator
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonRuonanWang committed Oct 29, 2021
1 parent d6f80ff commit 54ba768
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/adios2/operator/compress/CompressSirius.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ CompressSirius::CompressSirius(const Params &parameters)
m_TierBuffers.resize(m_Tiers);
}

CompressSirius::CompressSirius() : Operator("sirius")
{
m_Tiers = 4;
m_TierBuffersMap.resize(m_Tiers);
m_TierBuffers.resize(m_Tiers);
}

size_t CompressSirius::Operate(const char *dataIn, const Dims &blockStart,
const Dims &blockCount, const DataType varType,
char *bufferOut, const Params &params)
Expand Down
2 changes: 2 additions & 0 deletions source/adios2/operator/compress/CompressSirius.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class CompressSirius : public Operator
public:
CompressSirius(const Params &parameters);

CompressSirius();

~CompressSirius() = default;

size_t Operate(const char *dataIn, const Dims &blockStart,
Expand Down
10 changes: 10 additions & 0 deletions source/adios2/operator/compress/CompressorFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ size_t CompressorFactory::Decompress(const char *bufferIn, const size_t sizeIn,
#else
throw std::runtime_error("ERROR: current ADIOS2 library didn't compile "
"with PNG, can't use compressor\n");
#endif
}
else if (compressorType == Operator::OperatorType::SIRIUS)
{
#ifdef ADIOS2_HAVE_MHS
compress::CompressSirius op;
return op.InverseOperate(bufferIn, sizeIn, dataOut);
#else
throw std::runtime_error("ERROR: current ADIOS2 library didn't compile "
"with MHS, can't use Sirius compressor\n");
#endif
}
else if (compressorType == Operator::OperatorType::Sz)
Expand Down

0 comments on commit 54ba768

Please sign in to comment.