16#define INT64_T_MPI_TYPE MPI_LONG_LONG
18#define SIZE_MUST_BE_A_POWER_OF_TWO
21#ifdef SIZE_MUST_BE_A_POWER_OF_TWO
27#ifdef SIZE_MUST_BE_A_POWER_OF_TWO
28#define MOD_SIZE(v) ((v) & size_minus_one)
29#define DIV_SIZE(v) ((v) >> lgsize)
31#define MOD_SIZE(v) ((v) % size)
32#define DIV_SIZE(v) ((v) / size)
34#define VERTEX_OWNER(v) ((int)(MOD_SIZE(v)))
35#define VERTEX_LOCAL(v) ((size_t)(DIV_SIZE(v)))
36#define VERTEX_TO_GLOBAL(i) ((int64_t)((i) * size + rank))
void * xMPI_Alloc_mem(size_t nbytes)
void * xrealloc(void *p, size_t nbytes)
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)
void * xcalloc(size_t n, size_t unit)
void * xmalloc(size_t nbytes)
void run_mpi_bfs(const csr_graph *const g, int64_t root, int64_t *pred, int64_t *nvisited)
int validate_bfs_result(const csr_graph *const g, const int64_t root, const int64_t *const pred, const int64_t nvisited)
void convert_graph_to_csr(const int64_t nedges, const int64_t *const edges, csr_graph *const g)
void free_csr_graph(csr_graph *const g)
unsigned __int64 uint64_t