Go to the source code of this file.
|
| #define | RandomInRange(u) ((int)(1.0*(u)*rand()/(RAND_MAX+1.0))) |
| |
| #define | amax(a, b) ((a) >= (b) ? (a) : (b)) |
| |
| #define | amin(a, b) ((a) >= (b) ? (b) : (a)) |
| |
| #define | AND(a, b) ((a) < 0 ? ((-(a))&(b)) : ((a)&(b))) |
| |
| #define | OR(a, b) ((a) < 0 ? -((-(a))|(b)) : ((a)|(b))) |
| |
| #define | XOR(a, b) ((a) < 0 ? -((-(a))^(b)) : ((a)^(b))) |
| |
| #define | SWAP(a, b, tmp) do {(tmp) = (a); (a) = (b); (b) = (tmp);} while(0) |
| |
| #define | INC_DEC(a, b, val) do {(a) += (val); (b) -= (val);} while(0) |
| |
| #define | icopy(n, a, b) memcpy((b), (a), sizeof(int)*(n)) |
| |
| #define | scopy(n, a, b) memcpy((b), (a), sizeof(float)*(n)) |
| |
| #define | idxcopy(n, a, b) memcpy((b), (a), sizeof(idxtype)*(n)) |
| |
| #define | HASHFCT(key, size) ((key)%(size)) |
| |
| #define | cleartimer(tmr) (tmr = 0.0) |
| |
| #define | starttimer(tmr) (tmr -= MPI_Wtime()) |
| |
| #define | stoptimer(tmr) (tmr += MPI_Wtime()) |
| |
| #define | gettimer(tmr) (tmr) |
| |
| #define | IFSET(a, flag, cmd) if ((a)&(flag)) (cmd); |
| |
| #define | MALLOC_CHECK(ptr) ; |
| |
| #define | MAKECSR(i, n, a) |
| |
| #define | SHIFTCSR(i, n, a) |
| |
| #define | ASSERT(ctrl, expr) |
| |
| #define | ASSERTP(ctrl, expr, msg) |
| |
| #define | ASSERTS(expr) |
| |
| #define | ASSERTSP(expr, msg) |
| |
| #define | BNDInsert(nbnd, bndind, bndptr, vtx) |
| |
| #define | BNDDelete(nbnd, bndind, bndptr, vtx) |
| |
◆ amax
| #define amax |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) >= (b) ? (a) : (b)) |
◆ amin
| #define amin |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) >= (b) ? (b) : (a)) |
◆ AND
| #define AND |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < 0 ? ((-(a))&(b)) : ((a)&(b))) |
◆ ASSERT
| #define ASSERT |
( |
|
ctrl, |
|
|
|
expr |
|
) |
| |
Value: if (!(expr)) { \
myprintf(ctrl, "***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
assert(expr); \
}
◆ ASSERTP
| #define ASSERTP |
( |
|
ctrl, |
|
|
|
expr, |
|
|
|
msg |
|
) |
| |
Value: if (!(expr)) { \
myprintf(ctrl, "***ASSERTION failed on line %d of file %s:" #expr "\n", \
__LINE__, __FILE__); \
myprintf msg ; \
assert(expr); \
}
◆ ASSERTS
Value: if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
assert(expr); \
}
◆ ASSERTSP
| #define ASSERTSP |
( |
|
expr, |
|
|
|
msg |
|
) |
| |
Value: if (!(expr)) { \
printf("***ASSERTION failed on line %d of file %s: " #expr "\n", \
__LINE__, __FILE__); \
printf msg ; \
assert(expr); \
}
◆ BNDDelete
| #define BNDDelete |
( |
|
nbnd, |
|
|
|
bndind, |
|
|
|
bndptr, |
|
|
|
vtx |
|
) |
| |
Value: do { \
bndind[bndptr[vtx]] = bndind[--nbnd]; \
bndptr[bndind[nbnd]] = bndptr[vtx]; \
bndptr[vtx] = -1; \
} while(0)
◆ BNDInsert
| #define BNDInsert |
( |
|
nbnd, |
|
|
|
bndind, |
|
|
|
bndptr, |
|
|
|
vtx |
|
) |
| |
Value: do { \
bndind[nbnd] = vtx; \
bndptr[vtx] = nbnd++;\
} while(0)
◆ cleartimer
| #define cleartimer |
( |
|
tmr | ) |
(tmr = 0.0) |
◆ gettimer
| #define gettimer |
( |
|
tmr | ) |
(tmr) |
◆ HASHFCT
| #define HASHFCT |
( |
|
key, |
|
|
|
size |
|
) |
| ((key)%(size)) |
◆ icopy
| #define icopy |
( |
|
n, |
|
|
|
a, |
|
|
|
b |
|
) |
| memcpy((b), (a), sizeof(int)*(n)) |
◆ idxcopy
| #define idxcopy |
( |
|
n, |
|
|
|
a, |
|
|
|
b |
|
) |
| memcpy((b), (a), sizeof(idxtype)*(n)) |
◆ IFSET
| #define IFSET |
( |
|
a, |
|
|
|
flag, |
|
|
|
cmd |
|
) |
| if ((a)&(flag)) (cmd); |
◆ INC_DEC
| #define INC_DEC |
( |
|
a, |
|
|
|
b, |
|
|
|
val |
|
) |
| do {(a) += (val); (b) -= (val);} while(0) |
◆ MAKECSR
| #define MAKECSR |
( |
|
i, |
|
|
|
n, |
|
|
|
a |
|
) |
| |
Value: do { \
a[0] = 0; \
} while(0)
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
const Scalar * a
Definition: level2_cplx_impl.h:32
◆ MALLOC_CHECK
| #define MALLOC_CHECK |
( |
|
ptr | ) |
; |
◆ OR
| #define OR |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < 0 ? -((-(a))|(b)) : ((a)|(b))) |
◆ RandomInRange
| #define RandomInRange |
( |
|
u | ) |
((int)(1.0*(u)*rand()/(RAND_MAX+1.0))) |
◆ scopy
| #define scopy |
( |
|
n, |
|
|
|
a, |
|
|
|
b |
|
) |
| memcpy((b), (a), sizeof(float)*(n)) |
◆ SHIFTCSR
| #define SHIFTCSR |
( |
|
i, |
|
|
|
n, |
|
|
|
a |
|
) |
| |
Value: do { \
a[0] = 0; \
} while(0)
◆ starttimer
| #define starttimer |
( |
|
tmr | ) |
(tmr -= MPI_Wtime()) |
◆ stoptimer
| #define stoptimer |
( |
|
tmr | ) |
(tmr += MPI_Wtime()) |
◆ SWAP
◆ XOR
| #define XOR |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < 0 ? -((-(a))^(b)) : ((a)^(b))) |