relatório limpo. falta começar apresentação.
[xYpjg3TdSw.git] / common.h
blob593ea59fb5afbb63fab0008693517fe811bca858
1 #ifndef __IA_MACROS_H__
2 #define __IA_MACROS_H__
4 #define MIN(x, y) ((x) < (y) ? (x) : (y))
6 #define rep(i, n) repi(i, n, 1)
7 #define repi(i, n, x) for(int i = 0; i < n; i += x)
8 #define repbe(i, b, n) repbc(i, b, n, <=)
9 #define repb(i, b, n) repbc(i, b, n, <)
10 #define repbc(i, b, n, c) for(int i = b; i c n; ++i)
11 #define reps(i, n) for(unsigned int i = 0; i < n.size(); ++i)
13 #define INDEX(i, j) (((i) << 3) + (j))
15 #endif