"fb_arc_set/shared/structs.c" did not exist on "833c5606210f849d416d1358fc14e8de8fddc4f3"
structs.c 437 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <stdbool.h> ///< For boolean constants

#define BUFF_SIZE 8
#define SET_MAX_SIZE 8

/// Struct for the edge
typedef struct edge {
    int u, v;
} edge_t;

/// Struct for the feedback arc set
typedef struct fb_set {
    bool valid;
    edge_t edges[SET_MAX_SIZE];
} fb_set_t;

/// Struct for the circular buffer
typedef struct buffer {
    bool terminate;
    fb_set_t sets[BUFF_SIZE];
} buffer_t;

static buffer_t *circ_buffer;