03cc3739d4
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
12 lines
296 B
C++
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);
|
|
}
|