parQHV
Compute HyperVolumes using threads
 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 "Extending
8  * quick hypervolume. Luís M. S. Russo, Alexandre P. Francisco:
9  * J. Heuristics 22(3): 245-271 (2016)".
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 #ifndef MACROCYCLE_H
28 #define MACROCYCLE_H
29 
30 #if(CLS == 0)
31 #undef CLS
32 #define CLS 1024
33 #endif
34 
35 #define sureInline(X) __inline X __attribute__((__gnu_inline__, __always_inline__, __artificial__))
36 
37 #define B1(X) (X)
38 #define B2(X) B1(X), (X)
39 #define B3(X) B2(X), (X)
40 #define B4(X) B3(X), (X)
41 #define B5(X) B4(X), (X)
42 #define B6(X) B5(X), (X)
43 #define B7(X) B6(X), (X)
44 #define B8(X) B7(X), (X)
45 #define B9(X) B8(X), (X)
46 #define B10(X) B9(X), (X)
47 #define B11(X) B10(X), (X)
48 #define B12(X) B11(X), (X)
49 #define B13(X) B12(X), (X)
50 #define B14(X) B13(X), (X)
51 #define B15(X) B14(X), (X)
52 #define B16(X) B15(X), (X)
53 #define B17(X) B16(X), (X)
54 #define B18(X) B17(X), (X)
55 #define B19(X) B18(X), (X)
56 #define B20(X) B19(X), (X)
57 #define B21(X) B20(X), (X)
58 #define B22(X) B21(X), (X)
59 #define B23(X) B22(X), (X)
60 #define B24(X) B23(X), (X)
61 #define B25(X) B24(X), (X)
62 #define B26(X) B25(X), (X)
63 #define B27(X) B26(X), (X)
64 #define B28(X) B27(X), (X)
65 #define B29(X) B28(X), (X)
66 #define B30(X) B29(X), (X)
67 
68 #define B_(x, i) B##i(x)
69 #define B(x, i) B_(x, i)
70 
71 #define P1 0
72 #define P2 1
73 #define P3 2
74 #define P4 3
75 #define P5 4
76 #define P6 5
77 #define P7 6
78 #define P8 7
79 #define P9 8
80 #define P10 9
81 #define P11 10
82 #define P12 11
83 #define P13 12
84 #define P14 13
85 #define P15 14
86 #define P16 15
87 #define P17 16
88 #define P18 17
89 #define P19 18
90 #define P20 19
91 #define P21 20
92 #define P22 21
93 #define P23 22
94 #define P24 23
95 #define P25 24
96 #define P26 25
97 #define P27 26
98 #define P28 27
99 #define P29 28
100 #define P30 29
101 #define P31 30
102 #define P32 31
103 #define P33 32
104 
105 #define P_(i) P##i
106 #define P(i) P_(i)
107 
108 #endif /* MACROCYCLE_H */