Skip to content

Commit

Permalink
fixed a bug calculating complex type size in mgard operator
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonRuonanWang committed Jan 19, 2022
1 parent 2b5b392 commit db8c10a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/adios2/operator/compress/CompressMGARD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,14 @@ size_t CompressMGARD::DecompressV1(const char *bufferIn, const size_t sizeIn,
std::to_string(GetParameter<uint8_t>(bufferIn, bufferInOffset)) +
". Please make sure a compatible version is used for decompression.";

const size_t sizeOut =
size_t sizeOut =
helper::GetTotalSize(blockCount, helper::GetDataTypeSize(type));

if (type == DataType::FloatComplex || type == DataType::DoubleComplex)
{
sizeOut /= 2;
}

try
{
void *dataOutVoid = nullptr;
Expand Down

0 comments on commit db8c10a

Please sign in to comment.