diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/103_cocsep_selfsim_distribution/00_all.in (renamed from test/103_cocsep_ttrep/00_all.in) | 0 | ||||
| -rw-r--r-- | test/103_cocsep_selfsim_distribution/00_all.out | 12 | ||||
| -rw-r--r-- | test/103_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c | 41 | ||||
| -rw-r--r-- | test/104_cocsep_ttrep/00_all.in (renamed from test/103_cocsep_ttrep/00_all.out) | 0 | ||||
| -rw-r--r-- | test/104_cocsep_ttrep/00_all.out | 0 | ||||
| -rw-r--r-- | test/104_cocsep_ttrep/cocsep_ttrep_tests.c (renamed from test/103_cocsep_ttrep/cocsep_ttrep_tests.c) | 0 |
6 files changed, 53 insertions, 0 deletions
diff --git a/test/103_cocsep_ttrep/00_all.in b/test/103_cocsep_selfsim_distribution/00_all.in index e69de29..e69de29 100644 --- a/test/103_cocsep_ttrep/00_all.in +++ b/test/103_cocsep_selfsim_distribution/00_all.in | |||
diff --git a/test/103_cocsep_selfsim_distribution/00_all.out b/test/103_cocsep_selfsim_distribution/00_all.out new file mode 100644 index 0000000..94e17a5 --- /dev/null +++ b/test/103_cocsep_selfsim_distribution/00_all.out | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | 373 self-similar positions out of 3393 | ||
| 2 | Size number of groups | ||
| 3 | 1 3020 | ||
| 4 | 2 311 | ||
| 5 | 3 8 | ||
| 6 | 4 35 | ||
| 7 | 6 9 | ||
| 8 | 8 6 | ||
| 9 | 12 1 | ||
| 10 | 16 1 | ||
| 11 | 24 1 | ||
| 12 | 48 1 | ||
diff --git a/test/103_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c b/test/103_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c new file mode 100644 index 0000000..fb1338e --- /dev/null +++ b/test/103_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | #include "../test.h" | ||
| 2 | |||
| 3 | #define COCSEP_CLASSES 3393 | ||
| 4 | |||
| 5 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); | ||
| 6 | int64_t coord_cocsep(cube_t); | ||
| 7 | |||
| 8 | int bcount(uint64_t x) { | ||
| 9 | int ret; | ||
| 10 | uint64_t i; | ||
| 11 | |||
| 12 | for (i = 0, ret = 0; i < 64; i++) | ||
| 13 | if (x & (UINT64_C(1) << i)) | ||
| 14 | ret++; | ||
| 15 | |||
| 16 | return ret; | ||
| 17 | } | ||
| 18 | |||
| 19 | void run(void) { | ||
| 20 | uint32_t buf[300000]; | ||
| 21 | int size[65], tot, j; | ||
| 22 | int64_t i; | ||
| 23 | uint64_t selfsim[COCSEP_CLASSES], sim; | ||
| 24 | cube_t rep[COCSEP_CLASSES]; | ||
| 25 | |||
| 26 | memset(size, 0, 65 * sizeof(int)); | ||
| 27 | gendata_cocsep(buf, selfsim, rep); | ||
| 28 | |||
| 29 | for (i = 0, tot = 0; i < COCSEP_CLASSES; i++) { | ||
| 30 | sim = selfsim[i]; | ||
| 31 | if (sim >> 1) | ||
| 32 | tot++; | ||
| 33 | size[bcount(sim)]++; | ||
| 34 | } | ||
| 35 | |||
| 36 | printf("%d self-similar positions out of 3393\n", tot); | ||
| 37 | printf("Size\tnumber of groups\n"); | ||
| 38 | for (j = 0; j <= 48; j++) | ||
| 39 | if (size[j] != 0) | ||
| 40 | printf("%d\t%d\n", j, size[j]); | ||
| 41 | } | ||
diff --git a/test/103_cocsep_ttrep/00_all.out b/test/104_cocsep_ttrep/00_all.in index e69de29..e69de29 100644 --- a/test/103_cocsep_ttrep/00_all.out +++ b/test/104_cocsep_ttrep/00_all.in | |||
diff --git a/test/104_cocsep_ttrep/00_all.out b/test/104_cocsep_ttrep/00_all.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/104_cocsep_ttrep/00_all.out | |||
diff --git a/test/103_cocsep_ttrep/cocsep_ttrep_tests.c b/test/104_cocsep_ttrep/cocsep_ttrep_tests.c index f0da151..f0da151 100644 --- a/test/103_cocsep_ttrep/cocsep_ttrep_tests.c +++ b/test/104_cocsep_ttrep/cocsep_ttrep_tests.c | |||
