source: soft/giet_vm/applications/ocean/giet_utils.H @ 581

Last change on this file since 581 was 581, checked in by laurent, 9 years ago

Adding ocean application, some mathematics functions and distributed locks

File size: 711 bytes
Line 
1#ifndef UTILS_H
2#define UTILS_H
3
4#include <stdio.h>
5
6
7
8extern volatile int run_threads;
9extern volatile long heap_inited;
10
11extern unsigned int nclusters_x;
12extern unsigned int nclusters_y;
13extern unsigned int procs_per_cluster;
14
15
16#define printf(...) giet_shr_printf(__VA_ARGS__)
17
18extern const char *optarg;
19
20int getopt (int argc, char *const *argv, const char *optstring);
21void exit (int status);
22void clusterXY (int tid, unsigned int *cx, unsigned int *cy);
23void *ocean_malloc (unsigned long s, int tid);
24unsigned int getLpid ();
25
26/** pseudo fprintf **/
27typedef char FILE;
28extern FILE *stdout;
29extern FILE *stderr;
30#define fprintf(prologue, ...)  printf("%s", prologue); \
31                                                                        printf(__VA_ARGS__);
32
33#endif
Note: See TracBrowser for help on using the repository browser.