include/qpixl/util.hpp
/// Return the next power of two
Return the next power of two
Return the next power of two
static inline size_t nextpow2( size_t x ) {
    x-- ;
    x |= x >>  1 ;
    x |= x >>  2 ;
    x |= x >>  4 ;
    x |= x >>  8 ;
    x |= x >> 16 ;
    x |= x >> 32 ;
    x++ ;
    return x ;
  }
static inline size_t nextpow2 ( size_t x ) { x -- ; x |= x >> 1 ; x |= x >> 2 ; x |= x >> 4 ; x |= x >> 8 ; x |= x >> 16 ; x |= x >> 32 ; x ++ ; return x ; }
Return the next power of two
Return the next power of two