src/operator/tensor/indexing_op.h
// Returns integer log2(a) rounded up
Returns integer log2(a) rounded up
Returns integer log2 ( a ) rounded up
inline int ilog2(unsigned int a) {
  int k = 1;
  while (a >>= 1) k++;
  return k;
}
inline int ilog2 ( unsigned int a ) { int k = 1 ; while ( a >>= 1 ) k ++ ; return k ; }
Returns integer log2(a) rounded up
Returns integer log2 ( a ) rounded up