density
C++11 library for paged memory management, function queues, heterogeneous queues and lifo memory management
Namespaces | Macros | Enumerations | Functions | Variables
density_common.h File Reference
#include <atomic>
#include <cstddef>
#include <limits>
#include <new>
#include <type_traits>
#include <utility>
#include <density/density_config.h>

Go to the source code of this file.

Namespaces

 density
 

Macros

#define DENSITY_VERSION   0x00020000
 
#define DENSITY_CPP14_CONSTEXPR
 
#define DENSITY_CPP17_NOEXCEPT
 
#define DENSITY_NODISCARD
 

Enumerations

enum  concurrency_cardinality { concurrency_single, concurrency_multiple }
 
enum  consistency_model { consistency_relaxed, consistency_sequential }
 
enum  progress_guarantee { progress_blocking, progress_obstruction_free, progress_lock_free, progress_wait_free }
 
enum  function_type_erasure { function_standard_erasure, function_manual_clear }
 

Functions

constexpr bool is_power_of_2 (size_t i_number) noexcept
 
bool address_is_aligned (const void *i_address, size_t i_alignment) noexcept
 
template<typename UINT >
bool uint_is_aligned (UINT i_uint, UINT i_alignment) noexcept
 
void * address_add (void *i_address, size_t i_offset) noexcept
 
const void * address_add (const void *i_address, size_t i_offset) noexcept
 
void * address_sub (void *i_address, size_t i_offset) noexcept
 
const void * address_sub (const void *i_address, size_t i_offset) noexcept
 
uintptr_t address_diff (const void *i_end_address, const void *i_start_address) noexcept
 
void * address_lower_align (void *i_address, size_t i_alignment) noexcept
 
const void * address_lower_align (const void *i_address, size_t i_alignment) noexcept
 
void * address_lower_align (void *i_address, size_t i_alignment, size_t i_alignment_offset) noexcept
 
const void * address_lower_align (const void *i_address, size_t i_alignment, size_t i_alignment_offset) noexcept
 
void * address_upper_align (void *i_address, size_t i_alignment) noexcept
 
const void * address_upper_align (const void *i_address, size_t i_alignment) noexcept
 
template<typename UINT >
constexpr UINT uint_upper_align (UINT i_uint, size_t i_alignment) noexcept
 
template<typename UINT >
constexpr UINT uint_lower_align (UINT i_uint, size_t i_alignment) noexcept
 
void * address_upper_align (void *i_address, size_t i_alignment, size_t i_alignment_offset) noexcept
 
const void * address_upper_align (const void *i_address, size_t i_alignment, size_t i_alignment_offset) noexcept
 
void * aligned_allocate (size_t i_size, size_t i_alignment, size_t i_alignment_offset=0)
 
void * try_aligned_allocate (size_t i_size, size_t i_alignment, size_t i_alignment_offset=0) noexcept
 
void aligned_deallocate (void *i_block, size_t i_size, size_t i_alignment, size_t i_alignment_offset=0) noexcept
 

Variables

constexpr char version [] = "2.0.0"
 

Macro Definition Documentation

#define DENSITY_VERSION   0x00020000

Version of the library, in the format 0xMMMMNNRR, where MMMM = major version (16 bits), NN = minor version (8 bits), and RR = revision (8 bits)