tables_types_macros.h (1560B)
1 #define OFFSET(B, K) (((char *)B) + K) 2 3 #define INFOSIZE INT64_C(512) 4 #define INFO_SOLVER_STRLEN INT64_C(100) 5 #define INFO_DISTRIBUTION_LEN INT64_C(21) 6 7 #define TABLETYPE_PRUNING UINT64_C(0) 8 #define TABLETYPE_SPECIAL UINT64_C(1) 9 10 #define INFO_OFFSET_DISTRIBUTION 0 11 #define INFO_OFFSET_TYPE (INFO_DISTRIBUTION_LEN * sizeof(uint64_t)) 12 #define INFO_OFFSET_INFOSIZE (INFO_OFFSET_TYPE + sizeof(uint64_t)) 13 #define INFO_OFFSET_FULLSIZE (INFO_OFFSET_INFOSIZE + sizeof(uint64_t)) 14 #define INFO_OFFSET_HASH (INFO_OFFSET_FULLSIZE + sizeof(uint64_t)) 15 #define INFO_OFFSET_ENTRIES (INFO_OFFSET_HASH + sizeof(uint64_t)) 16 #define INFO_OFFSET_CLASSES (INFO_OFFSET_ENTRIES + sizeof(uint64_t)) 17 #define INFO_OFFSET_NEXT (INFO_OFFSET_CLASSES + sizeof(uint64_t)) 18 #define INFO_OFFSET_SOLVER (INFO_OFFSET_NEXT + sizeof(uint64_t)) 19 #define INFO_OFFSET_H48H (INFO_OFFSET_SOLVER + INFO_SOLVER_STRLEN) 20 #define INFO_OFFSET_BITS (INFO_OFFSET_H48H + sizeof(uint8_t)) 21 #define INFO_OFFSET_BASE (INFO_OFFSET_BITS + sizeof(uint8_t)) 22 #define INFO_OFFSET_MAXVALUE (INFO_OFFSET_BASE + sizeof(uint8_t)) 23 24 typedef struct { 25 uint64_t distribution[INFO_DISTRIBUTION_LEN]; 26 uint64_t type; 27 uint64_t infosize; 28 uint64_t fullsize; 29 uint64_t hash; 30 uint64_t entries; 31 uint64_t classes; /* Used only by cocsepdata, for now */ 32 uint64_t next; 33 char solver[INFO_SOLVER_STRLEN]; 34 uint8_t h48h; /* Specific to H48 tables */ 35 uint8_t bits; 36 uint8_t base; 37 uint8_t maxvalue; 38 } tableinfo_t;