COMBINATORIAL_BLAS 1.6
Loading...
Searching...
No Matches
common.h File Reference
#include <stdint.h>
#include <stddef.h>
Include dependency graph for common.h:

Go to the source code of this file.

Classes

struct  csr_graph

Macros

#define INT64_T_MPI_TYPE   MPI_LONG_LONG
#define SIZE_MUST_BE_A_POWER_OF_TWO
#define MOD_SIZE(v)
#define DIV_SIZE(v)
#define VERTEX_OWNER(v)
#define VERTEX_LOCAL(v)
#define VERTEX_TO_GLOBAL(i)

Typedefs

typedef struct csr_graph csr_graph

Functions

void setup_globals (void)
void free_csr_graph (csr_graph *const g)
void * xMPI_Alloc_mem (size_t nbytes)
void * xmalloc (size_t nbytes)
void * xcalloc (size_t n, size_t unit)
void * xrealloc (void *p, size_t nbytes)
void convert_graph_to_csr (const int64_t nedges, const int64_t *const edges, csr_graph *const g)
void find_bfs_roots (int *num_bfs_roots, const csr_graph *const g, const uint64_t seed1, const uint64_t seed2, int64_t *const bfs_roots)
int validate_bfs_result (const csr_graph *const g, const int64_t root, const int64_t *const pred, const int64_t nvisited)
void run_mpi_bfs (const csr_graph *const g, int64_t root, int64_t *pred, int64_t *nvisited)

Variables

int rank
int size
int lgsize
int size_minus_one

Macro Definition Documentation

◆ DIV_SIZE

#define DIV_SIZE ( v)
Value:
((v) >> lgsize)
int lgsize

Definition at line 29 of file common.h.

◆ INT64_T_MPI_TYPE

#define INT64_T_MPI_TYPE   MPI_LONG_LONG

Definition at line 16 of file common.h.

◆ MOD_SIZE

#define MOD_SIZE ( v)
Value:
int size_minus_one
Definition common.h:22

Definition at line 28 of file common.h.

◆ SIZE_MUST_BE_A_POWER_OF_TWO

#define SIZE_MUST_BE_A_POWER_OF_TWO

Definition at line 18 of file common.h.

◆ VERTEX_LOCAL

#define VERTEX_LOCAL ( v)
Value:
((size_t)(DIV_SIZE(v)))
#define DIV_SIZE(v)
Definition common.h:29

Definition at line 35 of file common.h.

◆ VERTEX_OWNER

#define VERTEX_OWNER ( v)
Value:
((int)(MOD_SIZE(v)))
#define MOD_SIZE(v)
Definition common.h:28

Definition at line 34 of file common.h.

◆ VERTEX_TO_GLOBAL

#define VERTEX_TO_GLOBAL ( i)
Value:
((int64_t)((i) * size + rank))
int size
Definition common.h:20
int rank
long int64_t
Definition compat.h:21

Definition at line 36 of file common.h.

Typedef Documentation

◆ csr_graph

typedef struct csr_graph csr_graph

Function Documentation

◆ convert_graph_to_csr()

void convert_graph_to_csr ( const int64_t nedges,
const int64_t *const edges,
csr_graph *const g )

◆ find_bfs_roots()

void find_bfs_roots ( int * num_bfs_roots,
const csr_graph *const g,
const uint64_t seed1,
const uint64_t seed2,
int64_t *const bfs_roots )

◆ free_csr_graph()

void free_csr_graph ( csr_graph *const g)

◆ run_mpi_bfs()

void run_mpi_bfs ( const csr_graph *const g,
int64_t root,
int64_t * pred,
int64_t * nvisited )

◆ setup_globals()

void setup_globals ( void )

◆ validate_bfs_result()

int validate_bfs_result ( const csr_graph *const g,
const int64_t root,
const int64_t *const pred,
const int64_t nvisited )

◆ xcalloc()

void * xcalloc ( size_t n,
size_t unit )

◆ xmalloc()

void * xmalloc ( size_t nbytes)

◆ xMPI_Alloc_mem()

void * xMPI_Alloc_mem ( size_t nbytes)

◆ xrealloc()

void * xrealloc ( void * p,
size_t nbytes )

Variable Documentation

◆ lgsize

int lgsize
extern

◆ rank

int rank
extern

◆ size

int size

Definition at line 20 of file common.h.

◆ size_minus_one

int size_minus_one

Definition at line 22 of file common.h.