-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathheader.tmpl
581 lines (543 loc) · 21.5 KB
/
header.tmpl
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
/**
* \file header.h
* \brief Header for xmachine data structures and transition functions.
*/
#ifndef _HEADER_H
#define _HEADER_H
#ifdef _DEBUG_MODE
#define ERRCHECK
#else
#define NDEBUG
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
#include "mboard.h"
#define FLAME_INT_MAX (int)1e+12
#define FLAME_DOUBLE_MAX 1e+12
#define FLAME_INT_MIN (int)-1e+12
#define FLAME_DOUBLE_MIN -1e+12
#define FLAME_TEST_PRINT_START_AND_END_OF_MODEL_FUNCTIONS 0
#define FLAME_TEST_PRINT_START_AND_END_OF_LIBMBOARD_CALLS 0
#define FLAME_USE_FILTERS_IN_SYNC 1
/*#define PAUSE printf("PAUSE - type anything to continue");i=getc(stdin);*/
#define PAUSE
#ifdef START_END
int start_simulation(void);
int end_simulation(void);
int start_iteration(void);
int end_iteration(void);
#endif
<?if parallel?>#include <mpi.h>
<?end if?>
/* Checking macros */
#ifdef CHECK_MEMORY
#define CHECK_POINTER(PT) if(PT==NULL){printf("**** ERROR in Memory check 1\n");exit(1);}
#else
#define CHECK_POINTER(PT)
#endif
<?foreach xagent?>
<?foreach state?>
<?if last?>
#define START_LOOP_OVER_$agent_name_AGENTS \
current_xmachine_$agent_name_holder = $agent_name_$name_state->agents;\
while (current_xmachine_$agent_name_holder) {\
temp_xmachine_$agent_name_holder = current_xmachine_$agent_name_holder->next;\
current_xmachine_$agent_name = current_xmachine_$agent_name_holder->agent;\
current_xmachine->xmachine_$agent_name = current_xmachine_$agent_name;
#define END_LOOP_OVER_$agent_name_AGENTS \
current_xmachine_$agent_name = NULL;\
current_xmachine->xmachine_$agent_name = NULL;\
current_xmachine_$agent_name_holder = temp_xmachine_$agent_name_holder;\
}
<?end if?>
<?end foreach?>
<?end foreach?>
<?foreach envvar?>
/** \def $uc_name
* \brief Provide access to environment variables in uppercase. */
#define $uc_name (FLAME_get_environment_variable_$name())<?end foreach?>
/** \def ARRAY_BLOCK_SIZE
* \brief The block size to allocate to dynamic arrays. */
#define ARRAY_BLOCK_SIZE 10
/** \def ARRAY_GROWTH_RATE
* \brief Growth ratio to scale size of dynamic arrays.
* Use golden ratio. This makes for a Fibonacci sequence, so the next allocation size
* is the sum of the current size and the previous size thus improving the chance of
* memory block reuse. It also allows for moderate rate of growth.
*/
#define ARRAY_GROWTH_RATE 1.618034
<?foreach message?>/** \def START_$capsname_MESSAGE_LOOP
* \brief Start of loop to process $name messages. */
#define START_$capsname_MESSAGE_LOOP for($name_message = get_first_$name_message(); $name_message != NULL; $name_message = get_next_$name_message($name_message)) {
/** \def FINISH_$capsname_MESSAGE_LOOP
* \brief Finish of loop to process $name messages. */
#define FINISH_$capsname_MESSAGE_LOOP }
<?end foreach?>
struct FLAME_output
{
int type; /* 0=snapshot <?foreach xagent?>$xagentcountplusone=$name <?end foreach?>*/
int format; /* 0=XML */
char * location;
int period;
int phase;
int flag; /* Used when outputting to show it has been used */
struct FLAME_output * next;
};
typedef struct FLAME_output FLAME_output;
/** \struct int_array
* \brief Dynamic array to hold integers.
*
* Holds a pointer to an integer array and values for size and memory size.
*/
struct int_array
{
int size;
int total_size;
int * array;
};
/** \struct float_array
* \brief Dynamic array to hold floats.
*
* Holds a pointer to an float array and values for size and memory size.
*/
struct float_array
{
int size;
int total_size;
float * array;
};
/** \struct double_array
* \brief Dynamic array to hold doubles.
*
* Holds a pointer to a double array and values for size and memory size.
*/
struct double_array
{
int size;
int total_size;
double * array;
};
/** \struct char_array
* \brief Dynamic array to hold chars.
*
* Holds a pointer to a char array and values for size and memory size.
*/
struct char_array
{
int size;
int total_size;
char * array;
};
/** \typedef struct int_array int_array
* \brief Typedef for int_array struct.
*/
typedef struct int_array int_array;
/** \typedef struct float_array float_array
* \brief Typedef for float_array struct.
*/
typedef struct float_array float_array;
/** \typedef struct double_array double_array
* \brief Typedef for double_array struct.
*/
typedef struct double_array double_array;
/** \typedef struct char_array char_array
* \brief Typedef for char_array struct.
*/
typedef struct char_array char_array;
<?foreach datatype?>/** \struct $name
* \brief $desc.
*
* $desc.
*/
struct $name
{
<?foreach datatypevar?> $type $name<?if static_array?>[$arraylength]<?end if?>; /**< Datatype memory variable $name of type $type. */
<?end foreach?>};
/** \struct $name_array
* \brief Dynamic array to hold $names
*/
struct $name_array
{
int size;
int total_size;
struct $name * array;
};
/** \var typedef $name $name
* \brief Typedef for $name struct.
*/
typedef struct $name $name;
/** \var typedef $name_array $name_array
* \brief Typedef for $name_array struct.
*/
typedef struct $name_array $name_array;
<?end foreach?><?foreach xagent?>
/** \struct xmachine_memory_$name
* \brief Holds memory of xmachine $name.
*/
struct xmachine_memory_$name
{<?foreach xagentvar?>
$type $name<?if static_array?>[$arraylength]<?end if?>; /**< X-machine memory variable $name of type $type. */<?end foreach?>
};
/** \struct xmachine_memory_$name_holder
* \brief Holds struct of memory of xmachine $name.
*/
struct xmachine_memory_$name_holder
{
/*@dependent@*/ struct xmachine_memory_$name * agent; /**< Pointer to X-machine memory $name. */
/*@dependent@*/ struct xmachine_memory_$name_holder * prev; /**< Pointer to previous $name agent in the list. */
/*@dependent@*/ struct xmachine_memory_$name_holder * next; /**< Pointer to next $name agent in the list. */
};
/** \struct xmachine_memory_$name_holder
* \brief Holds struct of memory of xmachine $name.
*/
struct xmachine_memory_$name_state
{
/*@dependent@*/ struct xmachine_memory_$name_holder * agents; /**< Pointer to X-machine memory $name. */
int count; /**< Number of agents that were in this state. */
};
<?end foreach?>
/** \struct xmachine
* \brief Holds xmachines.
*/
struct xmachine
{<?foreach xagent?>
/*@dependent@*/ /*@null@*/ /*@out@*/ struct xmachine_memory_$name * xmachine_$name; /**< Pointer to X-machine memory of type $name. */<?end foreach?>
};
<?foreach message?>
/** \var void* FLAME_m_$name_composite_params\n
* \brief Pointer to message sync agent composite params */
void* FLAME_m_$name_composite_params;
/** \struct m_$name
* \brief Holds message of type $name_message.
*/
struct m_$name
{<?foreach messagevar?>
$type $name<?if static_array?>[$arraylength]<?end if?>; /**< Message memory variable $name of type $type. */<?end foreach?>
};
<?end foreach?>
/** \typedef struct xmachine xmachine
* \brief Typedef for xmachine struct.
*/
typedef struct xmachine xmachine;<?foreach xagent?>
/** \var typedef xmachine_memory_$name xmachine_memory_$name
* \brief Typedef for xmachine_memory_$name struct.
*/
typedef struct xmachine_memory_$name xmachine_memory_$name;
/** \var typedef xmachine_memory_$name xmachine_memory_$name
* \brief Typedef for xmachine_memory_$name struct.
*/
typedef struct xmachine_memory_$name_holder xmachine_memory_$name_holder;
/** \var typedef xmachine_memory_$name xmachine_memory_$name
* \brief Typedef for xmachine_memory_$name struct.
*/
typedef struct xmachine_memory_$name_state xmachine_memory_$name_state;<?end foreach?><?foreach message?>
/** \typedef m_$name m_$name
* \brief Typedef for m_$name struct.
*/
typedef struct m_$name m_$name;
<?end foreach?>
/** \struct location
* \brief Holds location for calculating space partitioning .
*/
struct location
{
double point; /**< Point on an axis. */
struct location * next; /**< Pointer to next location on the list. */
};
/** \struct node_information
* \brief Holds node information .
*/
struct node_information
{
int node_id; /**< Node ID. */
double partition_data[6]; /**< Defines bounding box. */
int neighbours[10]; /**< Defines the neighbours to this node - -99 if no neighbour */
int agents_in_halo; /**< Number of agents in the halo region. */
int agent_total; /**< Total number of agents on the node. */
struct xmachine * agents; /**< Pointer to list of X-machines. */
<?foreach message?> struct m_$name * $name_messages; /**< Pointer to $name message list. */
<?end foreach?><?if parallel?><?foreach message?> int $name_message_no; /**< Number of $name messages in list to send. */
<?end foreach?><?foreach xagent?> struct xmachine * $name_agents; /**< Pointer to $name agent list. */
int $name_agent_no; /**< Number of $name agents in list to send. */
<?end foreach?><?end if?>
struct node_information * next; /**< Pointer to next node on the list. */
};
<?if parallel?>/** \struct space_partition
* \brief Holds space partition information .
*/
struct space_partition
{
int node_id; /**< Node ID. */
double partition_data[6]; /**< Defines bounding box. */
};
/** \typedef struct space_partition space_partition
* \brief Typedef for space_partition struct.
*/
typedef struct space_partition space_partition;<?end if?>
/** \typedef struct location location
* \brief Typedef for location struct.
*/
typedef struct location location;
/** \typedef struct node_information node_information
* \brief Typedef for node_information struct.
*/
typedef struct node_information node_information;
<?foreach envvar?>
/** \var $type $name
* \brief A constant variable from the environment. */
$type FLAME_environment_variable_$name;<?end foreach?>
/** \var xmachine * temp_xmachine
* \brief Pointer to xmachine to initialise linked list. */
xmachine * temp_xmachine;
<?foreach message?>
/** \var m_$name * temp_$name_message
* \brief Pointer to m_$name to initialise linked list. */
m_$name * temp_$name_message;<?end foreach?>
/** \var node_information * temp_node_info
* \brief Pointer to node_information to initialise linked list. */
node_information * temp_node_info;
/** \var char outputpath[1000]
* \brief Output path for files. */
char outputpath[1000];
/** \var long total_time
* \brief Total time for the simulation run (in seconds) */
double total_time;
/** \var int total_messages
* \brief Total messages sent between nodes for the simulation run */
int total_messages;
/** \var int totalnodes
* \brief Number of nodes */
int totalnodes;
/** \var xmachine ** p_xmachine
* \brief Pointer to first pointer of x-machine memory list */
//xmachine ** p_xmachine;
/** \var xmachine * current_xmachine
* \brief Pointer to current x-machine memory that is being processed */
xmachine * current_xmachine;
<?foreach xagent?>/* Pointer to current $agent_name agent */
/*@dependent@*/ /*@null@*/ /*@out@*/ xmachine_memory_$name * current_xmachine_$name;
/*@dependent@*/ xmachine_memory_$name_holder * temp_xmachine_$name_holder;
/*@dependent@*/ /*@null@*/ /*@out@*/ xmachine_memory_$name_holder * current_xmachine_$name_holder;
xmachine_memory_$name_state * current_xmachine_$name_next_state; /* New agents added to this state */
<?foreach state?>/* Pointer to list of $agent_name agents in state $name state */
//xmachine_memory_$agent_name * temp_xmachine_$agent_name_$name;
xmachine_memory_$agent_name_state * $agent_name_$name_state;
<?end foreach?><?end foreach?>
<?foreach constant_filter_variable?>
/** \var MBt_IndexMap FLAME_map_$agent_name_$name
* \brief Declaration of index map handle for constant filter agent variable */
MBt_IndexMap FLAME_map_$agent_name_$name;
<?end foreach?>
<?foreach message?>
MBt_Board b_$name;
MBt_Iterator i_$name;
<?end foreach?>
<?foreach message?>
/** \var m_$name * $name_message
* \brief Pointer to message struct for looping through $name message list */
m_$name * $name_message;<?end foreach?>
/** \var FLAME_output ** FLAME_outputs
* \brief Pointer to list of outputs */
FLAME_output * FLAME_outputs;
/** \var node_information * p_node_info
* \brief Pointer to first pointer of node list */
node_information ** p_node_info;
/** \var node_information * current_node
* \brief Pointer to current node */
node_information * current_node;
<?if serial?>
/** \var int node_number\n
* \brief Node number (not needed for serial codes) */
int node_number;
<?end if?>
<?if parallel?>
/** \var MPI_Status status
* \brief MPI status */
MPI_Status status;
/** \var MPI_Datatype spacePartitionType
* \brief MPI space partition type */
MPI_Datatype spacePartitionType;
<?foreach xagent?>
/** \var MPI_Datatype xmachine$nameType
* \brief MPI ", $name xmachine */
/* MPI_Datatype xmachine$nameType; */
<?end foreach?>
<?foreach message?>
/** \var MPI_Datatype message$nameType
* \brief MPI ", $name message */
/* MPI_Datatype message$nameType; */
<?end foreach?>
/** \var int node_number\n
* \brief Node number (identifier for node) */
int node_number;
<?end if?>
/** \var int iteration_loop
* \brief The current iteration number */
int iteration_loop;
/** \var int output_frequency
* \brief Frequency to output results */
int output_frequency;
/** \var int output_offset
* \brief Offset to output results */
int output_offset;
/** \def SPINF
* \brief Dummy inf value for space partition data. */
#define SPINF 999999.123456
/** \def RELEASE
* \brief Used to kill an agent via 'return RELEASE;'. */
#define RELEASE 1
/** \def kill_me_now
* \brief Used to kill an agent via 'kill_me_now'. */
#define kill_me_now return 1
void initialise_pointers(void);
void initialise_unit_testing(void);
FLAME_output * add_FLAME_output(FLAME_output ** outputs);
void free_FLAME_outputs(FLAME_output ** outputs);
void add_location(double point, location ** p_location);
void freelocations(location ** p_location);
void add_node(int node_id, double minx, double maxx, double miny, double maxy, double minz, double maxz);
void clean_up(int code);
void propagate_agents(void);
void propagate_messages_init(void);
void propagate_messages_complete(void);
void create_partitions(char * filename, int * itno);
void free_node_info(void);
void free_agent(void);
void freexmachines(void);
/* model datatypes */
<?foreach datatype?>
void init_$name_array($name_array * array);
void reset_$name_array($name_array * array);
void free_$name_array($name_array * array);
void copy_$name_array($name_array * from, $name_array * to);
void add_$name($name_array * array<?foreach datatypevar?>, <?if modeldatatype?><?if not_array?>/*@out@*/<?end if?><?end if?><?if array?>/*@out@*/<?end if?> $type <?if modeldatatype?><?if not_array?>* <?end if?><?end if?><?if array?>* <?end if?>$name<?end foreach?>);
void remove_$name($name_array * array, int index);
<?end foreach?>
void init_int_static_array(/*@out@*/ int * array, int size);
void init_int_array(int_array * array);
void reset_int_array(int_array * array);
void free_int_array(int_array * array);
void copy_int_array(int_array * from, int_array * to);
//void sort_int_array(int_array array);
//int quicksort_int(int array, int elements);
void add_int(int_array * array, int new_int);
void remove_int(int_array * array, int index);
void print_int_array(int_array * array);
void init_float_static_array(float * array, int size);
void init_float_array(float_array * array);
void reset_float_array(float_array * array);
void free_float_array(float_array * array);
void copy_float_array(float_array * from, float_array * to);
//void sort_float_array(float_array array);
//int quicksort_float(float array, int elements);
void add_float(float_array * array, float new_float);
void remove_float(float_array * array, int index);
void print_float_array(float_array * array);
void init_double_static_array(/*@out@*/ double* array, int size);
void init_double_array(double_array * array);
void reset_double_array(double_array * array);
void free_double_array(double_array * array);
void copy_double_array(double_array * from, double_array * to);
//void sort_double_array(double_array array);
//int quicksort_double(double array, int elements);
void add_double(double_array * array, double new_double);
void remove_double(double_array * array, int index);
void print_double_array(double_array * array);
void init_char_static_array(/*@out@*/ char * array, int size);
void init_char_array(char_array * array);
void reset_char_array(char_array * array);
void free_char_array(char_array * array);
void copy_char_array(char_array * from, char_array * to);
void add_char(char_array * array, char new_char);
void remove_char(char_array * array, int index);
char * copy_array_to_str(char_array * array);
void print_char_array(char_array * array);
int idle(void);
/* xml.c */
int read_int_static_array(char * buffer, int buffer_size, int * j, int * int_static_array, int size);
int read_float_static_array(char * buffer, int buffer_size, int * j, float * float_static_array, int size);
int read_double_static_array(char * buffer, int buffer_size, int * j, double * double_static_array, int size);
int read_char_static_array(char * buffer, int buffer_size, int * j, char * char_static_array, int size);
int read_int_dynamic_array(char * buffer, int buffer_size, int * j, int_array * int_dynamic_array);
int read_float_dynamic_array(char * buffer, int buffer_size, int * j, float_array * float_dynamic_array);
int read_double_dynamic_array(char * buffer, int buffer_size, int * j, double_array * double_dynamic_array);
int read_char_dynamic_array(char * buffer, int buffer_size, int * j, char_array * char_dynamic_array);
<?foreach datatype?>
void init_$name(/*@out@*/ $name * temp);
void init_$name_static_array(/*@out@*/ $name * array, int size);
int read_$name(char * buffer, int buffer_size, int * j, $name * temp_datatype);
int read_$name_dynamic_array(char * buffer, int buffer_size, int * j, $name_array * temp_datatype_array);
int read_$name_static_array(char * buffer, int buffer_size, int * j, $name * temp_datatype_array, int size);
void write_$name(FILE *file, $name * temp_datatype);
void write_$name_static_array(FILE *file, $name * temp_datatype, int size);
void write_$name_dynamic_array(FILE *file, $name_array * temp_datatype);<?end foreach?>
<?if parallel?>
void readprepartitionedinitialstates(char * filename, char * filelocation, int * itno);
<?end if?>
void readinitialstates(char * filename, char * filelocation, int * itno, double cloud_data[],
int partition_method, int flag);
void saveiterationdata(int iteration_number);
<?foreach datatype?>
void free_$name($name * temp);
void free_$name_static_array($name * array, int size);
void copy_$name($name * from, $name * to);
void copy_$name_static_array($name * from, $name * to, int size);<?end foreach?>
<?foreach xagent?>
xmachine_memory_$name_state * init_$name_state();
xmachine_memory_$name * init_$name_agent();
void free_$name_agent(xmachine_memory_$name_holder * tmp, xmachine_memory_$name_state * state);
void transition_$name_agent(xmachine_memory_$name_holder * tmp, xmachine_memory_$name_state * from_state, xmachine_memory_$name_state * to_state);
void add_$name_agent_internal(xmachine_memory_$name * agent, xmachine_memory_$name_state * state);
void add_$name_agent(<?foreach xagentvar?>$type <?if dynamic_array?>* <?end if?>$name<?if static_array?>[]<?end if?><?if notlast?>, <?end if?><?end foreach?>);
void unittest_init_$name_agent();
void unittest_free_$name_agent();<?end foreach?>
<?foreach message?>
void add_$name_message(<?foreach messagevar?>$type $name<?if static_array?>[]<?end if?><?if notlast?>, <?end if?><?end foreach?>);
m_$name * add_$name_message_internal(void);
m_$name * get_first_$name_message(void);
m_$name * get_next_$name_message(m_$name * current);
void free$namemessages(void);
<?if filter?>int FLAME_composite_filter_$name(const void *msg, const void *composite_params);
int FLAME_build_filter_param_$name();<?end if?><?end foreach?>
<?foreach allvar?><?if not_modeldatatype?><?if not_array?>
void set_$name($type <?if dynamic_array?>* <?end if?><?if static_array?>*<?end if?>$name<?if static_array?>[]<?end if?>);<?end if?><?end if?>
$type <?if modeldatatype?>* <?end if?><?if not_modeldatatype?><?if array?>* <?end if?><?end if?>get_$name();<?end foreach?>
int agent_get_id(void);
double agent_get_x(void);
double agent_get_y(void);
double agent_get_z(void);
/* partitioning.c */
<?if serial?>void partition_data(int totalnodes, xmachine ** agent_list, double cloud_data[], int partition_method);<?end if?>
<?if parallel?>void send_spacepartition(int node_id, double minx, double maxx, double miny, double maxy, double minz, double maxz);<?end if?>
<?if parallel?>void broadcast_node_data(int totalnodes, int node_number);<?end if?>
void save_partition_data(void);
void generate_partitions(double cloud_data[], int partitions, int partition_method);
/* messageboard.c */
<?foreach message?>m_$name * get_next_message_$name_in_range(m_$name * current);
<?if make_x_func?>double $name_message_extract_x(void *msg_ptr);<?end if?>
<?if make_y_func?>double $name_message_extract_y(void *msg_ptr);<?end if?>
<?if make_z_func?>double $name_message_extract_z(void *msg_ptr);<?end if?>
<?end foreach?>
/* memory.c */
xmachine * add_xmachine(void);
<?foreach envvar?>$type FLAME_get_environment_variable_$name();
<?end foreach?>
<?foreach xagent?><?foreach xagentvar?><?if constant?>$type FLAME_get_$agent_name_variable_$name();
<?end if?><?end foreach?><?end foreach?>
/* rules.c */
int FLAME_integer_in_array(int a, int * b, int size);
<?foreach message?><?foreach sync?><?if sync_filter?>MBt_Filter $name_filter;
int FLAME_create_and_assign_$name();
<?end if?><?end foreach?><?end foreach?>
/* timing.c */
double get_time(void);
<?foreach xagent?><?foreach function?>
<?if not_idle?>int $name(void);<?end if?><?if condition?>
int $condition(xmachine_memory_$agent_name *a);<?end if?><?foreach function_input?><?if filter?>
int $filter(const void *msg, const void *params);<?end if?><?if sort?>
int $sort();<?end if?><?end foreach?><?end foreach?><?end foreach?>
#endif