LCOV - code coverage report
Current view: top level - discof/reasm - fd_reasm_private.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 17 17 100.0 %
Date: 2025-10-13 04:42:14 Functions: 0 0 -

          Line data    Source code
       1             : #include "fd_reasm.h"
       2             : 
       3             : #define POOL_NAME              pool
       4          18 : #define POOL_T                 fd_reasm_fec_t
       5             : #include "../../util/tmpl/fd_pool.c"
       6             : 
       7             : #define MAP_NAME               ancestry
       8             : #define MAP_ELE_T              fd_reasm_fec_t
       9             : #define MAP_KEY_T              fd_hash_t
      10          54 : #define MAP_KEY_EQ(k0,k1)      (!memcmp((k0),(k1),sizeof(fd_hash_t)))
      11         321 : #define MAP_KEY_HASH(key,seed) (fd_hash((seed),(key),sizeof(fd_hash_t))) /* FIXME keyspace partitioning */
      12             : #include "../../util/tmpl/fd_map_chain.c"
      13             : 
      14             : #define MAP_NAME               frontier
      15             : #define MAP_ELE_T              fd_reasm_fec_t
      16             : #define MAP_KEY_T              fd_hash_t
      17         153 : #define MAP_KEY_EQ(k0,k1)      (!memcmp((k0),(k1),sizeof(fd_hash_t)))
      18         408 : #define MAP_KEY_HASH(key,seed) (fd_hash((seed),(key),sizeof(fd_hash_t))) /* FIXME keyspace partitioning */
      19             : #include "../../util/tmpl/fd_map_chain.c"
      20             : 
      21             : #define MAP_NAME               orphaned
      22             : #define MAP_ELE_T              fd_reasm_fec_t
      23             : #define MAP_KEY_T              fd_hash_t
      24          30 : #define MAP_KEY_EQ(k0,k1)      (!memcmp((k0),(k1),sizeof(fd_hash_t)))
      25         264 : #define MAP_KEY_HASH(key,seed) (fd_hash((seed),(key),sizeof(fd_hash_t))) /* FIXME keyspace partitioning */
      26             : #include "../../util/tmpl/fd_map_chain.c"
      27             : 
      28             : #define MAP_NAME               subtrees
      29             : #define MAP_ELE_T              fd_reasm_fec_t
      30             : #define MAP_KEY_T              fd_hash_t
      31          51 : #define MAP_KEY_EQ(k0,k1)      (!memcmp((k0),(k1),sizeof(fd_hash_t)))
      32         273 : #define MAP_KEY_HASH(key,seed) (fd_hash((seed),(key),sizeof(fd_hash_t))) /* FIXME keyspace partitioning */
      33             : #include "../../util/tmpl/fd_map_chain.c"
      34             : 
      35             : #define DLIST_NAME             subtreel
      36             : #define DLIST_ELE_T            fd_reasm_fec_t
      37          54 : #define DLIST_PREV             dlist_prev
      38         123 : #define DLIST_NEXT             dlist_next
      39             : #include "../../util/tmpl/fd_dlist.c"
      40             : 
      41             : #define DEQUE_NAME             bfs
      42         123 : #define DEQUE_T                ulong
      43             : #include "../../util/tmpl/fd_deque_dynamic.c"
      44             : 
      45             : #define DEQUE_NAME             out
      46          21 : #define DEQUE_T                ulong
      47             : #include "../../util/tmpl/fd_deque_dynamic.c"
      48             : 
      49             : typedef struct {
      50             :   ulong     slot;
      51             :   fd_hash_t block_id;
      52             : } slot_mr_t;
      53             : 
      54             : #define MAP_NAME         slot_mr
      55         171 : #define MAP_T            slot_mr_t
      56         486 : #define MAP_KEY          slot
      57         486 : #define MAP_KEY_NULL     ULONG_MAX
      58         183 : #define MAP_KEY_INVAL(k) ((k)==MAP_KEY_NULL)
      59             : #define MAP_MEMOIZE      0
      60             : #include "../../util/tmpl/fd_map_dynamic.c"
      61             : 
      62             : struct __attribute__((aligned(128UL))) fd_reasm {
      63             :   ulong            slot0;       /* special initialization slot. chains first FEC */
      64             :   ulong            root;        /* pool idx of the root FEC set */
      65             :   fd_reasm_fec_t * pool;        /* pool of FEC nodes backing the above maps / tree */
      66             :   ancestry_t *     ancestry;    /* map of mr->fec. non-leaves of the connected tree */
      67             :   frontier_t *     frontier;    /* map of mr->fec. leaves of the connected tree */
      68             :   orphaned_t *     orphaned;    /* map of mr->fec. non-roots of the orphaned subtrees */
      69             :   subtrees_t *     subtrees;    /* map of mr->fec. roots of the orphaned subtrees */
      70             :   subtreel_t       _subtrlf[1]; /* internal dlist of the elements in subtrees in no particular order */
      71             :   subtreel_t *     subtreel;    /* the join to the dlist */
      72             :   ulong *          bfs;         /* internal queue of pool idxs for BFS */
      73             :   ulong *          out;         /* delivery queue of pool idxs to output */
      74             :   slot_mr_t *      slot_mr;     /* map of slot->mr */
      75             : };

Generated by: LCOV version 1.14