Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::Support Namespace Reference

Support algorithms and datastructures More...

Classes

class  Allocator
 Default memory allocator. More...
 
class  BitSet
 Simple bitsets. More...
 
class  BitSetBase
 Basic bitset support. More...
 
class  BitSetData
 Date item for bitsets. More...
 
class  BitSetOffset
 Bitsets with index offset. More...
 
class  BlockAllocator
 Manage memory organized into block lists (allocator) More...
 
class  BlockClient
 Client for block allocator of type T. More...
 
class  DynamicArray
 Array with arbitrary number of elements. More...
 
class  DynamicQueue
 Queue with arbitrary number of elements. More...
 
class  DynamicStack
 Stack with arbitrary number of elements. More...
 
class  Event
 An event for synchronization. More...
 
class  IntTypeTraits
 Traits to for information about integer types. More...
 
class  IntTypeTraits< signed char >
 Traits for signed char. More...
 
class  IntTypeTraits< signed int >
 Traits for signed integer. More...
 
class  IntTypeTraits< signed short int >
 Traits for signed short int. More...
 
class  IntTypeTraits< unsigned char >
 Traits for unsigned char. More...
 
class  IntTypeTraits< unsigned int >
 Traits for unsigned integer. More...
 
class  IntTypeTraits< unsigned short int >
 Traits for unsigned short int. More...
 
class  Job
 Baseclass for jobs with return type RetType. More...
 
class  JobStop
 Class to throw an exception to stop new jobs from being started. More...
 
class  Less
 Comparison class for sorting using <. More...
 
class  LinearCongruentialGenerator
 Template for linear congruential generators. More...
 
class  Lock
 A lock as a scoped frontend for a mutex. More...
 
class  Mutex
 A mutex for mutual exclausion among several threads. More...
 
class  QuickSortStack
 Static stack for quicksort. More...
 
class  RawBitSetBase
 Basic bitset support (without stored size information) More...
 
class  RefCount
 A class for thread-safe reference counting. More...
 
class  RunJobs
 Parallel iterator that runs jobs with a given number of threads. More...
 
class  Runnable
 An interface for objects that can be run by a thread. More...
 
class  StaticStack
 Stack with fixed number of elements. More...
 
class  Terminator
 An interface for objects that can be called after a thread has terminated (after running the thread's destructor) More...
 
class  Thread
 Simple threads. More...
 
class  Timer
 Timer More...
 

Typedefs

typedef LinearCongruentialGenerator< 2147483647, 48271, 44488, 3399 > RandomGenerator
 Default values for linear congruential generator.
 
typedef Mutex FastMutex
 

Enumerations

enum  BitSetStatus { BSS_NONE , BSS_ALL , BSS_SOME }
 Status of a bitset. More...
 
enum  IntType { IT_CHAR = 0 , IT_SHRT = 1 , IT_INT = 2 }
 Description of integer types. More...
 

Functions

template<class A , class Char , class Traits >
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const BitSetOffset< A > &bs)
 
unsigned int hwrnd (void)
 Return hardware generated random number.
 
IntType u_type (unsigned int n)
 Return type required to represent n.
 
IntType s_type (signed int n)
 Return type required to represent n.
 
IntType s_type (int n)
 
bool marked (void *p)
 Check whether p is marked.
 
void * mark (void *p)
 Return marked pointer for unmarked pointer p.
 
void * unmark (void *p)
 Return unmarked pointer for a marked pointer p.
 
void * fmark (void *p)
 Return marked pointer for p (possibly already marked)
 
void * funmark (void *p)
 Return unmarked pointer for a possibly marked pointer p.
 
void * ptrsplit (void *p, ptrdiff_t &m)
 Split possibly marked pointer p into mark m and unmarked pointer.
 
void * ptrjoin (void *p, ptrdiff_t m)
 Join unmarked pointer p and m into marked pointer.
 
template<class Type , class Less >
void exchange (Type &a, Type &b, Less &less)
 Exchange elements according to order.
 
template<class Type , class Less >
void insertion (Type *l, Type *r, Less &less)
 Standard insertion sort.
 
template<class Type , class Less >
Type * partition (Type *l, Type *r, Less &less)
 Standard partioning.
 
template<class Type , class Less >
void quicksort (Type *l, Type *r, Less &less)
 Standard quick sort.
 
template<class Type , class Less >
void insertion (Type *x, int n, Less &l)
 Insertion sort.
 
template<class Type >
void insertion (Type *x, int n)
 Insertion sort.
 
template<class Type , class Less >
void quicksort (Type *x, int n, Less &l)
 Quicksort.
 
template<class Type >
void quicksort (Type *x, int n)
 Quicksort.
 
void * bootstrap (void *p)
 Function to start execution.
 

Variables

Allocator allocator
 The single global default memory allocator.
 
int const QuickSortCutoff = 20
 Perform quicksort only for more elements.
 

Detailed Description

Support algorithms and datastructures

Typedef Documentation

◆ FastMutex

Definition at line 140 of file thread.hpp.

Enumeration Type Documentation

◆ BitSetStatus

Status of a bitset.

Enumerator
BSS_NONE 

No bits set.

BSS_ALL 

All bits set.

BSS_SOME 

Some but not all bits set.

Definition at line 130 of file bitset-base.hpp.

◆ IntType

Description of integer types.

Enumerator
IT_CHAR 

char integer type

IT_SHRT 

short integer type

IT_INT 

integer type

Definition at line 39 of file int-type.hpp.

Function Documentation

◆ operator<<()

template<class A , class Char , class Traits >
std::basic_ostream< Char, Traits > & Gecode::Support::operator<< ( std::basic_ostream< Char, Traits > & os,
const BitSetOffset< A > & bs )

Definition at line 137 of file bitset-offset.hpp.

◆ hwrnd()

unsigned int Gecode::Support::hwrnd ( void )

Return hardware generated random number.

Definition at line 59 of file hw-rnd.cpp.

◆ u_type()

IntType Gecode::Support::u_type ( unsigned int n)
inline

Return type required to represent n.

Definition at line 147 of file int-type.hpp.

◆ s_type() [1/2]

IntType Gecode::Support::s_type ( signed int n)

Return type required to represent n.

◆ s_type() [2/2]

IntType Gecode::Support::s_type ( int n)
inline

Definition at line 157 of file int-type.hpp.

◆ marked()

bool Gecode::Support::marked ( void * p)
inline

Check whether p is marked.

Definition at line 54 of file marked-pointer.hpp.

◆ mark()

void * Gecode::Support::mark ( void * p)
inline

Return marked pointer for unmarked pointer p.

Definition at line 58 of file marked-pointer.hpp.

◆ unmark()

void * Gecode::Support::unmark ( void * p)
inline

Return unmarked pointer for a marked pointer p.

Definition at line 63 of file marked-pointer.hpp.

◆ fmark()

void * Gecode::Support::fmark ( void * p)
inline

Return marked pointer for p (possibly already marked)

Definition at line 68 of file marked-pointer.hpp.

◆ funmark()

void * Gecode::Support::funmark ( void * p)
inline

Return unmarked pointer for a possibly marked pointer p.

Definition at line 72 of file marked-pointer.hpp.

◆ ptrsplit()

void * Gecode::Support::ptrsplit ( void * p,
ptrdiff_t & m )
inline

Split possibly marked pointer p into mark m and unmarked pointer.

Definition at line 77 of file marked-pointer.hpp.

◆ ptrjoin()

void * Gecode::Support::ptrjoin ( void * p,
ptrdiff_t m )
inline

Join unmarked pointer p and m into marked pointer.

Definition at line 83 of file marked-pointer.hpp.

◆ exchange()

template<class Type , class Less >
void Gecode::Support::exchange ( Type & a,
Type & b,
Less & less )
inline

Exchange elements according to order.

Definition at line 42 of file sort.hpp.

◆ insertion()

template<class Type , class Less >
void Gecode::Support::insertion ( Type * l,
Type * r,
Less & less )
inline

Standard insertion sort.

Definition at line 97 of file sort.hpp.

◆ partition()

template<class Type , class Less >
Type * Gecode::Support::partition ( Type * l,
Type * r,
Less & less )
inline

Standard partioning.

Definition at line 113 of file sort.hpp.

◆ quicksort()

template<class Type , class Less >
void Gecode::Support::quicksort ( Type * l,
Type * r,
Less & less )
inline

Standard quick sort.

Definition at line 130 of file sort.hpp.

◆ bootstrap()

void * Gecode::Support::bootstrap ( void * p)

Function to start execution.

Definition at line 42 of file pthreads.cpp.

Variable Documentation

◆ QuickSortCutoff

int const Gecode::Support::QuickSortCutoff = 20

Perform quicksort only for more elements.

Definition at line 47 of file sort.hpp.