-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.h
67 lines (44 loc) · 1012 Bytes
/
macros.h
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
/*
* File: macros.h
* Author: andres
*
* Created on May 31, 2010, 1:12 PM
*/
#ifndef _MACROS_H
#define _MACROS_H
#define DEBUG 1
/**
* Print Macros
*
* These are used to add some safety checks to basic print operations.
*
* Some output format may also be modified here
*
* Contains different levels of debug operation
*/
#if DEBUG == 0
#define PRINTLN(str) printf("%s\n", str)
#define PRINT(str) printf("%s", str)
#elif DEBUG == 1
#define PRINTLN(str) assert(str); printf("%s\n", str)
#define PRINT(str) assert(str); printf("%s", str)
#endif
/**
* Macros Related to formatting
*/
#define FEDGE "-->[%d:%d]"
#define FVERTEX "[%d] "
#define FPARTITIONHEADER "Partition %d.%d\n"
#define FPARTITION1 "%d"
#define FPARTITION2 "->%d"
/**
* CLI parameters
*/
#define CLIFILE "-f"
/**
* Testing Macros
*/
#define TSTART printf("----S %d----\n", testnum);
#define TEND printf("----E %d----\n\n", testnum++);
#define TESTGRAPH(code) TSTART code; TEND
#endif /* _MACROS_H */