1 | #include "duckdb/common/constants.hpp" |
---|---|
2 | |
3 | #include <limits> |
4 | |
5 | using namespace duckdb; |
6 | using namespace std; |
7 | |
8 | namespace duckdb { |
9 | |
10 | const idx_t INVALID_INDEX = (idx_t)-1; |
11 | const row_t MAX_ROW_ID = 4611686018427388000ULL; // 2^62 |
12 | const column_t COLUMN_IDENTIFIER_ROW_ID = (column_t)-1; |
13 | const sel_t ZERO_VECTOR[STANDARD_VECTOR_SIZE] = {0}; |
14 | const double PI = 3.141592653589793; |
15 | |
16 | const transaction_t TRANSACTION_ID_START = 4611686018427388000ULL; // 2^62 |
17 | const transaction_t NOT_DELETED_ID = std::numeric_limits<transaction_t>::max() - 1; // 2^64 - 1 |
18 | const transaction_t MAXIMUM_QUERY_ID = std::numeric_limits<transaction_t>::max(); // 2^64 |
19 | |
20 | uint64_t NextPowerOfTwo(uint64_t v) { |
21 | v--; |
22 | v |= v >> 1; |
23 | v |= v >> 2; |
24 | v |= v >> 4; |
25 | v |= v >> 8; |
26 | v |= v >> 16; |
27 | v |= v >> 32; |
28 | v++; |
29 | return v; |
30 | } |
31 | |
32 | } // namespace duckdb |
33 |