Generated on Sat Jul 28 2018 17:21:22 for Gecode by doxygen 1.8.14
heap.hpp File Reference

(Revision: 14972)

#include <cstring>
#include <cstdlib>
#include <algorithm>

Go to the source code of this file.

Classes

class  Gecode::Heap
 Heap memory management class More...
 
class  Gecode::HeapAllocated
 Base class for heap allocated objects. More...
 

Namespaces

 Gecode
 Gecode toplevel namespace
 

Macros

#define GECODE_SUPPORT_REALLOC(T)
 
#define GECODE_SUPPORT_COPY(T)
 

Macro Definition Documentation

◆ GECODE_SUPPORT_REALLOC

#define GECODE_SUPPORT_REALLOC (   T)
Value:
template<> \
forceinline T* \
Heap::realloc<T>(T* b, long unsigned int, long unsigned int m) { \
return static_cast<T*>(rrealloc(b,m*sizeof(T))); \
} \
template<> \
forceinline T* \
Heap::realloc<T>(T* b, long int n, long int m) { \
assert((n >= 0) && (m >= 0)); \
return realloc<T>(b,static_cast<long unsigned int>(n), \
static_cast<long unsigned int>(m)); \
} \
template<> \
forceinline T* \
Heap::realloc<T>(T* b, unsigned int n, unsigned int m) { \
return realloc<T>(b,static_cast<long unsigned int>(n), \
static_cast<long unsigned int>(m)); \
} \
template<> \
forceinline T* \
Heap::realloc<T>(T* b, int n, int m) { \
assert((n >= 0) && (m >= 0)); \
return realloc<T>(b,static_cast<long unsigned int>(n), \
static_cast<long unsigned int>(m)); \
}
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)

Definition at line 518 of file heap.hpp.

◆ GECODE_SUPPORT_COPY

#define GECODE_SUPPORT_COPY (   T)
Value:
template<> \
forceinline T* \
Heap::copy(T* d, const T* s, long unsigned int n) { \
return static_cast<T*>(Support::allocator.memcpy(d,s,n*sizeof(T))); \
} \
template<> \
forceinline T* \
Heap::copy(T* d, const T* s, long int n) { \
assert(n >= 0); \
return copy<T>(d,s,static_cast<long unsigned int>(n)); \
} \
template<> \
forceinline T* \
Heap::copy(T* d, const T* s, unsigned int n) { \
return copy<T>(d,s,static_cast<long unsigned int>(n)); \
} \
template<> \
forceinline T* \
Heap::copy(T* d, const T* s, int n) { \
assert(n >= 0); \
return copy<T>(d,s,static_cast<long unsigned int>(n)); \
}
Gecode::IntSet d(v, 7)
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
void * memcpy(void *d, const void *s, size_t n)
Copy n bytes from source s directly to d and returns d.
Definition: allocator.hpp:95
Allocator allocator
The single global default memory allocator.
Definition: allocator.cpp:42

Definition at line 610 of file heap.hpp.