lean2/src/util/bit_tricks.h
Leonardo de Moura 03cc3739d4 Fix bugs in mpbq.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-07-21 20:12:04 -07:00

12 lines
296 B
C++

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
namespace lean {
inline bool is_power_of_two(unsigned v) { return !(v & (v - 1)) && v; }
unsigned log2(unsigned v);
}