int main (const int argc, char *argv[]) { parse_args (argc, argv, &initial_graph_name, &action_stream_name, &batch_size, &nbatch); STATS_INIT(); load_graph_and_action_stream (initial_graph_name, &nv, &ne, (int64_t**)&off, (int64_t**)&ind, (int64_t**)&weight, (int64_t**)&graphmem, action_stream_name, &naction, (int64_t**)&action, (int64_t**)&actionmem); print_initial_graph_stats (nv, ne, batch_size, nbatch, naction); BATCH_SIZE_CHECK(); #if defined(_OPENMP) OMP(omp parallel) { OMP(omp master) PRINT_STAT_INT64 ("num_threads", (long int) omp_get_num_threads()); }
int main (const int argc, char *argv[]) { parse_args (argc, argv, &initial_graph_name, &action_stream_name, &batch_size, &nbatch); STATS_INIT (); load_graph_and_action_stream (initial_graph_name, &nv, &ne, (int64_t **) & off, (int64_t **) & ind, (int64_t **) & weight, (int64_t **) & graphmem, action_stream_name, &naction, (int64_t **) & action, (int64_t **) & actionmem); print_initial_graph_stats (nv, ne, batch_size, nbatch, naction); BATCH_SIZE_CHECK (); /* Convert to STINGER */ tic (); S = stinger_new (); stinger_set_initial_edges (S, nv, 0, off, ind, weight, NULL, NULL, 0); PRINT_STAT_DOUBLE ("time_stinger", toc ()); fflush (stdout); int64_t numSteps = 3; int64_t src_dest_pair[2] = { 124, 381 }; tic (); int64_t size_intersect = st_conn_stinger (S, nv, ne, src_dest_pair, 1, numSteps); PRINT_STAT_DOUBLE ("time_st_conn_stinger", toc ()); PRINT_STAT_INT64 ("size_intersect", size_intersect); stinger_free_all (S); free (graphmem); free (actionmem); STATS_END (); }
int main (const int argc, char *argv[]) { parse_args (argc, argv, &initial_graph_name, &action_stream_name, &batch_size, &nbatch); STATS_INIT (); load_graph_and_action_stream (initial_graph_name, &nv, &ne, (int64_t **) & off, (int64_t **) & ind, (int64_t **) & weight, (int64_t **) & graphmem, action_stream_name, &naction, (int64_t **) & action, (int64_t **) & actionmem); print_initial_graph_stats (nv, ne, batch_size, nbatch, naction); BATCH_SIZE_CHECK (); int64_t *component_map = xmalloc (nv * sizeof (int64_t)); /* Convert to STINGER */ tic (); S = stinger_new (); stinger_set_initial_edges (S, nv, 0, off, ind, weight, NULL, NULL, 0); PRINT_STAT_DOUBLE ("time_stinger", toc ()); fflush (stdout); tic (); int64_t num_comp_end = connected_components_stinger (S, nv, ne, component_map, NULL, NULL, NULL, NULL, NULL); PRINT_STAT_DOUBLE ("time_components_tree", toc ()); PRINT_STAT_INT64 ("number_of_components", num_comp_end); stinger_free_all (S); free (graphmem); free (actionmem); STATS_END (); }