Lines Matching refs:T
12 * \tparam T The type of the value (shall be some integral type.
17 template<typename T>
18 constexpr T trunc_order(T val, unsigned char order)
20 return val & ((~T(0)) << order);
26 * \tparam T The type of the value (shall be some integral type.
31 template<typename T>
32 constexpr T round_order(T val, unsigned char order)
34 return (val + (T(1) << order) - T(1)) & ((~T(0)) << order);
37 template<typename T>
38 constexpr T trunc_page(T val)
43 template<typename T>
44 constexpr T round_page(T val)
49 template<typename T>
51 max_order(unsigned char order, T addr,
52 T min_addr, T max_addr,
53 T hotspot = T(0))
57 T mask;
58 T base = trunc_order(addr, order + 1);
62 if (base + (T(1) << (order + 1)) - T(1) > max_addr - T(1))
65 mask = ~((~T(0)) << (order + 1));
66 if (hotspot == ~T(0) || ((addr ^ hotspot) & mask))