This repository has been archived on 2021-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
unix/fb_arc_set/shared/structs.c

24 lines
437 B
C
Raw Normal View History

#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;