COMBINATORIAL_BLAS  1.6
make_graph.h
Go to the documentation of this file.
1 /* Copyright (C) 2009-2010 The Trustees of Indiana University. */
2 /* */
3 /* Use, modification and distribution is subject to the Boost Software */
4 /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
5 /* http://www.boost.org/LICENSE_1_0.txt) */
6 /* */
7 /* Authors: Jeremiah Willcock */
8 /* Andrew Lumsdaine */
9 
10 #ifndef MAKE_GRAPH_H
11 #define MAKE_GRAPH_H
12 
13 #include <stdint.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /* Simplified interface for users; implemented in different ways on different
20  * platforms. */
21 void make_graph(
22  /* in */ int log_numverts /* log_2 of vertex count */,
23  /* in */ int64_t desired_nedges /* Target number of edges (actual number
24  * will be slightly smaller) */,
25  /* in */ uint64_t userseed1 /* Arbitrary 64-bit seed value */,
26  /* in */ uint64_t userseed2 /* Arbitrary 64-bit seed value */,
27  /* in */ const double initiator[4] /* Kronecker initiator (i.e., R-MAT a, b,
28  * c, d) */,
29  /* out */ int64_t* nedges /* Number of generated edges */,
30  /* out */ int64_t** result /* Array of edges (each pair of elements
31  * is a single edge); pairs with first
32  * element -1 should be ignored;
33  * allocated by make_graph() but must be
34  * freed using free() by user */
35 );
36 
37 /* PRNG interface for implementations; takes seed in same format as given by
38  * users, and creates a vector of doubles in a reproducible (and
39  * random-access) way. */
41  /* in */ int64_t nvalues /* Number of values to generate */,
42  /* in */ uint64_t userseed1 /* Arbitrary 64-bit seed value */,
43  /* in */ uint64_t userseed2 /* Arbitrary 64-bit seed value */,
44  /* in */ int64_t position /* Start index in random number stream */,
45  /* out */ double* result /* Returned array of values */
46 );
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* MAKE_GRAPH_H */
long int64_t
Definition: compat.h:21
void make_graph(int log_numverts, int64_t desired_nedges, uint64_t userseed1, uint64_t userseed2, const double initiator[4], int64_t *nedges, int64_t **result)
void make_random_numbers(int64_t nvalues, uint64_t userseed1, uint64_t userseed2, int64_t position, double *result)