In code ModMulFastConst function, according to the comments, the ModMulFastConst function comes from https://arxiv.org/pdf/1205.2926.pdf (Dave Harvey, FASTER ARITHMETIC FOR NUMBER-THEORETIC TRANSFORMS). The algorithm is described in lines 5-7 of Algorithm 2.
In the original paper,
Q ← ⌊W′T/β⌋
But in the code,
NativeInt q = MultDHi(m_value, bInv.m_value) + 1;
Why add 1 at the end?