ROSS
ross-base.h
Go to the documentation of this file.
1#ifndef INC_ross_base_h
2#define INC_ross_base_h
3
4#include <stdint.h>
5#include <stddef.h>
6#include "config.h"
7
8#if !defined(DBL_MAX)
9#include <float.h>
10#endif
11
12#ifdef __GNUC__
13# define NORETURN __attribute__((__noreturn__))
14#else
15# define NORETURN
16# ifndef __attribute__
17# define __attribute__(x)
18# endif
19#endif
20
21#ifdef ROSS_INTERNAL
22#undef malloc
23#undef calloc
24#undef realloc
25#undef strdup
26#undef free
27
28# define malloc(a) must_use_tw_calloc_not_malloc
29# define calloc(a,b) must_use_tw_calloc_not_calloc
30# define realloc(a,b) must_use_tw_calloc_not_realloc
31# define strdup(b) must_use_tw_calloc_not_strdup
32# define free(b) must_not_use_free
33#endif
34
35/* tw_peid -- Processing Element "PE" id */
36typedef unsigned long tw_peid;
37
38/* tw_stime -- Simulation time value for sim clock (NOT wall!) */
39typedef double tw_stime;
40#define MPI_TYPE_TW_STIME MPI_DOUBLE
41#define TW_STIME_CRT(x) (x)
42#define TW_STIME_DBL(x) (x)
43#define TW_STIME_CMP(x, y) (((x) < (y)) ? -1 : ((x) > (y)))
44#define TW_STIME_ADD(x, y) ((x) + (y))
45#define TW_STIME_MAX DBL_MAX
46
47/* tw_lpid -- Logical Process "LP" id */
48//typedef unsigned long long tw_lpid;
49typedef uint64_t tw_lpid;
50
51#endif /* INC_ross_base_h */
unsigned long tw_peid
Definition ross-base.h:36
double tw_stime
Definition ross-base.h:39
uint64_t tw_lpid
Definition ross-base.h:49