lopy4/components/Bliss-master/ntt_variants/make_bitrev_table.c
/*
 * Check that n is a power of two and return k such that n=2^k.
 */
Check that n is a power of two and return k such that n=2^k.
Check that n is a power of two and return k such that n = 2^k .
static bool logtwo(uint32_t n, uint32_t *k) {
  uint32_t i;
  i = 0;
  while ((n & 1) == 0) {
    i ++;
    n >>= 1;
  }
  if (n == 1) {
    *k = i;
    return true;
  }
  return false;
}
static bool logtwo ( uint32_t n , uint32_t * k ) { uint32_t i ; i = 0 ; while ( ( n & 1 ) == 0 ) { i ++ ; n >>= 1 ; } if ( n == 1 ) { * k = i ; return true ; } return false ; }
Check that n is a power of two and return k such that n=2^k.
Check that n is a power of two and return k such that n = 2^k .