Generated on Mon Aug 27 2012 17:15:52 for Gecode by doxygen 1.8.1.2
heap.hpp File Reference

(Revision: 11279)

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

Go to the source code of this file.

Classes

class  Gecode::Heap
 Heap memory management class More...

Namespaces

namespace  Gecode
 Gecode toplevel namespace

Macros

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

Macro Definition Documentation

#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)); \
}

Definition at line 438 of file heap.hpp.

#define GECODE_SUPPORT_COPY (   T)
Value:
template<> \
forceinline T* \
Heap::copy(T* d, const T* s, long unsigned int n) { \
return static_cast<T*>(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)); \
}

Definition at line 530 of file heap.hpp.