Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Minisat::Internal::RegionAllocator< T > Class Template Reference

#include <ogdf/lib/minisat/mtl/Alloc.h>

Public Types

enum  { Unit_Size = sizeof(uint32_t) }
 
enum  { Ref_Undef = UINT_MAX }
 
using Ref = uint32_t
 

Public Member Functions

 RegionAllocator (uint32_t start_cap=1024 *1024)
 
 ~RegionAllocator ()
 
Ref ael (const T *t)
 
Ref alloc (int size)
 
void free (int size)
 
T * lea (Ref r)
 
const T * lea (Ref r) const
 
void moveTo (RegionAllocator &to)
 
T & operator[] (Ref r)
 
const T & operator[] (Ref r) const
 
uint32_t size () const
 
uint32_t wasted () const
 

Private Member Functions

void capacity (uint32_t min_cap)
 

Private Attributes

uint32_t cap
 
T * memory
 
uint32_t sz
 
uint32_t wasted_
 

Detailed Description

template<class T>
class Minisat::Internal::RegionAllocator< T >

Definition at line 33 of file Alloc.h.

Member Typedef Documentation

◆ Ref

template<class T >
using Minisat::Internal::RegionAllocator< T >::Ref = uint32_t

Definition at line 43 of file Alloc.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
Unit_Size 

Definition at line 46 of file Alloc.h.

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
Ref_Undef 

Definition at line 45 of file Alloc.h.

Constructor & Destructor Documentation

◆ RegionAllocator()

template<class T >
Minisat::Internal::RegionAllocator< T >::RegionAllocator ( uint32_t  start_cap = 1024 * 1024)
inlineexplicit

Definition at line 48 of file Alloc.h.

◆ ~RegionAllocator()

template<class T >
Minisat::Internal::RegionAllocator< T >::~RegionAllocator ( )
inline

Definition at line 50 of file Alloc.h.

Member Function Documentation

◆ ael()

template<class T >
Ref Minisat::Internal::RegionAllocator< T >::ael ( const T *  t)
inline

Definition at line 70 of file Alloc.h.

◆ alloc()

template<class T >
RegionAllocator< T >::Ref Minisat::Internal::RegionAllocator< T >::alloc ( int  size)

Definition at line 117 of file Alloc.h.

◆ capacity()

template<class T >
void Minisat::Internal::RegionAllocator< T >::capacity ( uint32_t  min_cap)
private

Definition at line 90 of file Alloc.h.

◆ free()

template<class T >
void Minisat::Internal::RegionAllocator< T >::free ( int  size)
inline

Definition at line 61 of file Alloc.h.

◆ lea() [1/2]

template<class T >
T* Minisat::Internal::RegionAllocator< T >::lea ( Ref  r)
inline

Definition at line 67 of file Alloc.h.

◆ lea() [2/2]

template<class T >
const T* Minisat::Internal::RegionAllocator< T >::lea ( Ref  r) const
inline

Definition at line 68 of file Alloc.h.

◆ moveTo()

template<class T >
void Minisat::Internal::RegionAllocator< T >::moveTo ( RegionAllocator< T > &  to)
inline

Definition at line 76 of file Alloc.h.

◆ operator[]() [1/2]

template<class T >
T& Minisat::Internal::RegionAllocator< T >::operator[] ( Ref  r)
inline

Definition at line 64 of file Alloc.h.

◆ operator[]() [2/2]

template<class T >
const T& Minisat::Internal::RegionAllocator< T >::operator[] ( Ref  r) const
inline

Definition at line 65 of file Alloc.h.

◆ size()

template<class T >
uint32_t Minisat::Internal::RegionAllocator< T >::size ( ) const
inline

Definition at line 57 of file Alloc.h.

◆ wasted()

template<class T >
uint32_t Minisat::Internal::RegionAllocator< T >::wasted ( ) const
inline

Definition at line 58 of file Alloc.h.

Member Data Documentation

◆ cap

template<class T >
uint32_t Minisat::Internal::RegionAllocator< T >::cap
private

Definition at line 37 of file Alloc.h.

◆ memory

template<class T >
T* Minisat::Internal::RegionAllocator< T >::memory
private

Definition at line 35 of file Alloc.h.

◆ sz

template<class T >
uint32_t Minisat::Internal::RegionAllocator< T >::sz
private

Definition at line 36 of file Alloc.h.

◆ wasted_

template<class T >
uint32_t Minisat::Internal::RegionAllocator< T >::wasted_
private

Definition at line 38 of file Alloc.h.


The documentation for this class was generated from the following file: