EvalSumCols with small batching size

Hello,

In schemebase/base-advancedshe.cpp, function EvalSumCols, the mask vector is generated with size m/4:

std::vector<std::complex> mask(m / 4);
usint m = elementParams->GetCyclotomicOrder();

So, if you use the batch_size smaller than m/4 then you will have problem in the next step:

Plaintext plaintext = cc->MakeCKKSPackedPlaintext(mask, 1, 0, nullptr, ciphertext->GetSlots());

Is it a bug? Or any specific reason for that?

Thank you,

Yes, this appears to be a bug. I created an issue for it: Fix a bug in EvalSumCols · Issue #756 · openfheorg/openfhe-development · GitHub

1 Like