gendata_eo_tests.c (720B)
1 /* 2 Pruning table values (from nissy): 3 0: 1 4 1: 2 5 2: 25 6 3: 202 7 4: 620 8 5: 900 9 6: 285 10 7: 13 11 */ 12 13 #include "../test.h" 14 15 #define ISIZE 512 16 #define FULLSIZE (ISIZE + 1024) 17 18 unsigned char buf[FULLSIZE]; 19 20 long long gendata_coord_dispatch( 21 const char *, unsigned long long, unsigned char *); 22 int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); 23 24 void run(void) { 25 uint32_t i; 26 size_t result; 27 tableinfo_t info; 28 29 result = gendata_coord_dispatch("coord_EO_FB", FULLSIZE, buf); 30 if (readtableinfo(FULLSIZE, buf, &info) != NISSY_OK) { 31 printf("Error reading info from table\n"); 32 return; 33 } 34 35 printf("%zu\n", result); 36 for (i = 0; i <= 10; i++) 37 printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]); 38 }