QHV
Compute HyperVolumes sequentially
 All Data Structures Files Functions Variables Macros
macros.h
1 /*
2  *
3  * Copyright (c) Year(s), 2013, Luis M. S. Russo and Alexandre
4  * P. Francisco / KDBIO / INESC-ID, <qhv@kdbio.inesc-id.pt>
5  *
6  * Any published media that is related with to use of the distributed
7  * software, or derived software, must contain a reference to "Quick
8  * HyperVolume, Luís M. S. Russo, Alexandre P. Francisco IEEE Trans.
9  * Evolutionary Computation 18(4): 481-502(2014)".
10  *
11  * Permission to use, copy, modify, and/or distribute this software for
12  * any purpose with or without fee is hereby granted, provided that the
13  * above copyright notice and this permission notice appear in all
14  * copies.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
17  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
19  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
20  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
21  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23  * PERFORMANCE OF THIS SOFTWARE.
24  *
25  */
26 
27 
28 #ifndef MACROCYCLE_H
29 #define MACROCYCLE_H
30 
31 #if(CLS == 0)
32 #undef CLS
33 #define CLS 1024
34 #endif
35 
36 #define sureInline(X) __inline X __attribute__((__gnu_inline__, __always_inline__, __artificial__))
37 
38 #define B1(X) (X)
39 #define B2(X) B1(X), (X)
40 #define B3(X) B2(X), (X)
41 #define B4(X) B3(X), (X)
42 #define B5(X) B4(X), (X)
43 #define B6(X) B5(X), (X)
44 #define B7(X) B6(X), (X)
45 #define B8(X) B7(X), (X)
46 #define B9(X) B8(X), (X)
47 #define B10(X) B9(X), (X)
48 #define B11(X) B10(X), (X)
49 #define B12(X) B11(X), (X)
50 #define B13(X) B12(X), (X)
51 #define B14(X) B13(X), (X)
52 #define B15(X) B14(X), (X)
53 #define B16(X) B15(X), (X)
54 #define B17(X) B16(X), (X)
55 #define B18(X) B17(X), (X)
56 #define B19(X) B18(X), (X)
57 #define B20(X) B19(X), (X)
58 #define B21(X) B20(X), (X)
59 #define B22(X) B21(X), (X)
60 #define B23(X) B22(X), (X)
61 #define B24(X) B23(X), (X)
62 #define B25(X) B24(X), (X)
63 #define B26(X) B25(X), (X)
64 #define B27(X) B26(X), (X)
65 #define B28(X) B27(X), (X)
66 #define B29(X) B28(X), (X)
67 #define B30(X) B29(X), (X)
68 
69 #define B_(x, i) B##i(x)
70 #define B(x, i) B_(x, i)
71 
72 #define P1 0
73 #define P2 1
74 #define P3 2
75 #define P4 3
76 #define P5 4
77 #define P6 5
78 #define P7 6
79 #define P8 7
80 #define P9 8
81 #define P10 9
82 #define P11 10
83 #define P12 11
84 #define P13 12
85 #define P14 13
86 #define P15 14
87 #define P16 15
88 #define P17 16
89 #define P18 17
90 #define P19 18
91 #define P20 19
92 #define P21 20
93 #define P22 21
94 #define P23 22
95 #define P24 23
96 #define P25 24
97 #define P26 25
98 #define P27 26
99 #define P28 27
100 #define P29 28
101 #define P30 29
102 #define P31 30
103 #define P32 31
104 #define P33 32
105 
106 #define P_(i) P##i
107 #define P(i) P_(i)
108 
109 #endif /* MACROCYCLE_H */