forked from bonetblai/mini-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.cc
67 lines (59 loc) · 1.2 KB
/
global.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <limits.h>
#include "global.h"
namespace gpt
{
bool default_hp = true;
const char *algorithm = "lrtdp";
bool domain_analysis = false;
unsigned dead_end_value = 500; //UINT_MAX;
unsigned bound = 0;
unsigned cutoff = UINT_MAX;
double epsilon = 0;
bool hash_all = true;
const char *heuristic = "atom-min-1-backward";
size_t initial_hash_size = 204800;
unsigned max_database_size = 32;
bool noise = false;
double noise_level = 0;
unsigned seed = 0;
int simulations = 0;
unsigned verbosity = 0;
unsigned warning_level = 0;
double heuristic_weight = 4;
size_t xtra = 0;
std::stack<heuristic_t*> hstack;
};
#if MEM_DEBUG
void *
operator new( size_t size )
{
void *result = malloc( size );
fprintf( stderr, "new %p %d\n", result, size );
return( result );
}
void *
operator new[]( size_t size )
{
void *result = malloc( size );
fprintf( stderr, "new[] %p %d\n", result, size );
return( result );
}
void
operator delete( void *ptr )
{
if( ptr )
{
fprintf( stderr, "del %p\n", ptr );
free( ptr );
}
}
void
operator delete[]( void *ptr )
{
if( ptr )
{
fprintf( stderr, "del[] %p\n", ptr );
free( ptr );
}
}
#endif // MEM_DEBUG