Mercurial > pub > dyncall > dyncall
comparison test/suite_aggrs/globals.c @ 482:0f3b6898078d
suite_aggrs (still ahead of checked in version of dyncall, sorry):
- renaming struct -> aggr
- added knobs to:
* control struct packing
* whether to test immutability of aggr-by-val params
* how to copy aggrs (field by field or via = op (which might do a memcpy and thus copy padding garbage, also))
- some macros to reduce file sizes of generated cases
- setting default misalignment to 1
author | Tassilo Philipp |
---|---|
date | Wed, 16 Mar 2022 16:27:50 +0100 |
parents | 8b6a39592f86 |
children |
comparison
equal
deleted
inserted
replaced
481:0fc22b5feac7 | 482:0f3b6898078d |
---|---|
29 | 29 |
30 #define X(CH,T) T *V_##CH; T *K_##CH; | 30 #define X(CH,T) T *V_##CH; T *K_##CH; |
31 DEF_TYPES | 31 DEF_TYPES |
32 #undef X | 32 #undef X |
33 | 33 |
34 #define AGGR_MISALIGN 0 | 34 #define AGGR_MISALIGN 1 |
35 | 35 |
36 static double rand_d() { return ( ( (double) rand() ) / ( (double) RAND_MAX ) ); } | 36 static double rand_d() { return ( ( (double) rand() ) / ( (double) RAND_MAX ) ); } |
37 | 37 |
38 /* fill mem with random values, make sure no float aligned memory location | 38 /* fill mem with random values, make sure no float aligned memory location |
39 * results in a NaN, as they always compare to false; so avaid all ones in | 39 * results in a NaN, as they always compare to false; so avaid all ones in |