PandA-2024.02
Data Structures | Macros | Typedefs | Functions
bfs.h File Reference
#include <stdlib.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "support.h"
Include dependency graph for bfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  edge_t_struct
 
struct  node_t_struct
 
struct  bench_args_t
 

Macros

#define SCALE   8
 
#define EDGE_FACTOR   16
 
#define N_NODES   (1<<SCALE)
 
#define N_EDGES   (N_NODES*EDGE_FACTOR)
 
#define N_LEVELS   10
 
#define MAX_LEVEL   INT8_MAX
 

Typedefs

typedef uint64_t edge_index_t
 
typedef uint64_t node_index_t
 
typedef struct edge_t_struct edge_t
 
typedef struct node_t_struct node_t
 
typedef int8_t level_t
 

Functions

void bfs (node_t nodes[N_NODES], edge_t edges[N_EDGES], node_index_t starting_node, level_t level[N_NODES], edge_index_t level_counts[N_LEVELS])
 

Macro Definition Documentation

◆ EDGE_FACTOR

#define EDGE_FACTOR   16

Definition at line 15 of file bfs.h.

◆ MAX_LEVEL

#define MAX_LEVEL   INT8_MAX

Definition at line 40 of file bfs.h.

◆ N_EDGES

#define N_EDGES   (N_NODES*EDGE_FACTOR)

Definition at line 18 of file bfs.h.

◆ N_LEVELS

#define N_LEVELS   10

Definition at line 21 of file bfs.h.

◆ N_NODES

#define N_NODES   (1<<SCALE)

Definition at line 17 of file bfs.h.

◆ SCALE

#define SCALE   8

Definition at line 14 of file bfs.h.

Typedef Documentation

◆ edge_index_t

typedef uint64_t edge_index_t

Definition at line 24 of file bfs.h.

◆ edge_t

typedef struct edge_t_struct edge_t

◆ level_t

typedef int8_t level_t

Definition at line 39 of file bfs.h.

◆ node_index_t

typedef uint64_t node_index_t

Definition at line 25 of file bfs.h.

◆ node_t

typedef struct node_t_struct node_t

Function Documentation

◆ bfs()

void bfs ( node_t  nodes[N_NODES],
edge_t  edges[N_EDGES],
node_index_t  starting_node,
level_t  level[N_NODES],
edge_index_t  level_counts[N_LEVELS] 
)

Definition at line 9 of file bfs.c.

References edges, level, MAX_LEVEL, N_LEVELS, N_NODES, nodes, Q_EMPTY, Q_PEEK, Q_POP, and Q_PUSH.

Referenced by run_benchmark().

Here is the caller graph for this function:

Generated on Mon Feb 12 2024 13:03:10 for PandA-2024.02 by doxygen 1.8.13