Template Function lbcrypto::NextPowerOfTwo

Function Documentation

template<typename IntType>
IntType lbcrypto::NextPowerOfTwo(IntType n)

Returns the next power of 2 that is greater than the input number.

Parameters

&n – is the input value for which next power of 2 needs to be computed.

Returns

Next power of 2 that is greater or equal to n.