File indexing completed on 2026-04-09 07:49:48
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <cstdint>
0014
0015 struct st
0016 {
0017 static constexpr const uint64_t ONE = 1 ;
0018 static uint64_t complete_binary_tree_nodes(uint64_t height) ;
0019
0020 static constexpr uint64_t MAX_TREE_DEPTH = 64;
0021 };
0022
0023 inline uint64_t st::complete_binary_tree_nodes(uint64_t height)
0024 {
0025 assert(height < MAX_TREE_DEPTH);
0026 return ( (ONE << (ONE+(height))) - ONE ) ;
0027 }
0028
0029