tetl 0.1.0
Embedded Template Library
|
#include <pointer_int_pair_info.hpp>
Public Types | |
using | pointer_traits = PtrTraits |
using | pointer_type = PointerT |
Static Public Member Functions | |
static auto | get_int (etl::intptr_t value) -> etl::intptr_t |
static auto | get_pointer (etl::intptr_t value) -> pointer_type |
static auto | update_int (etl::intptr_t value, etl::intptr_t integer) -> etl::intptr_t |
static auto | update_ptr (etl::intptr_t value, pointer_type ptr) -> etl::intptr_t |
Static Public Attributes | |
static constexpr auto | free_bits = pointer_traits::free_bits |
static constexpr auto | int_bits = IntBits |
static constexpr auto | int_mask = static_cast<etl::uintptr_t>((static_cast<etl::intptr_t>(1) << int_bits) - 1) |
This is the unshifted mask for valid bits of the int type. | |
static constexpr auto | int_shift = static_cast<etl::uintptr_t>(pointer_traits::free_bits - int_bits) |
The number of low bits that we reserve for other uses; and keep zero. | |
static constexpr auto | ptr_mask = ~static_cast<etl::uintptr_t>((static_cast<etl::intptr_t>(1) << free_bits) - 1) |
The bits that come from the pointer. | |
static constexpr auto | shifted_int_mask = static_cast<etl::uintptr_t>(int_mask << int_shift) |
This is the bits for the integer shifted in place. | |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
staticconstexpr |
This is the unshifted mask for valid bits of the int type.
|
staticconstexpr |
The number of low bits that we reserve for other uses; and keep zero.
|
staticconstexpr |
The bits that come from the pointer.
|
staticconstexpr |
This is the bits for the integer shifted in place.