Last change
on this file since 65 was
63,
checked in by rosiere, 17 years ago
|
par rapport au commit precedent : commit des include commun et un petit (vraiment petit) peu de doc
|
File size:
333 bytes
|
Line | |
---|
1 | #ifndef morpheo_Log2 |
---|
2 | #define morpheo_Log2 |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include <math.h> |
---|
13 | using namespace std; |
---|
14 | |
---|
15 | namespace morpheo { |
---|
16 | |
---|
17 | inline uint32_t log2 (uint32_t value) |
---|
18 | { |
---|
19 | return static_cast<uint32_t>(ceil(::log2(value))); |
---|
20 | } |
---|
21 | |
---|
22 | }; // end namespace morpheo |
---|
23 | |
---|
24 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.