|
WildRiver
|
Top level C include for WildRiver. More...
#include <stdlib.h>#include <stdint.h>
Go to the source code of this file.
Classes | |
| struct | wildriver_matrix_handle |
| struct | wildriver_graph_handle |
| struct | wildriver_vector_handle |
Macros | |
| #define | WILDRIVER_VER_MAJOR 1 |
| #define | WILDRIVER_VER_MINOR 0 |
| #define | WILDRIVER_VER_SUBMINOR 0 |
| #define | WILDRIVER_INDEX_TYPE size_t |
| #define | WILDRIVER_DIMENSION_TYPE uint32_t |
| #define | WILDRIVER_VALUE_TYPE double |
Typedefs | |
| typedef WILDRIVER_INDEX_TYPE | wildriver_ind_t |
| typedef WILDRIVER_DIMENSION_TYPE | wildriver_dim_t |
| typedef WILDRIVER_VALUE_TYPE | wildriver_val_t |
Functions | |
| wildriver_matrix_handle * | wildriver_open_matrix (char const *fname, int mode) |
| Open a matrix for reading. The returned handle must be closed. More... | |
| int | wildriver_load_matrix (wildriver_matrix_handle *handle, wildriver_ind_t *rowptr, wildriver_dim_t *rowind, wildriver_val_t *rowval, double *progress) |
| Load the matrix into the given memory locations. More... | |
| int | wildriver_save_matrix (wildriver_matrix_handle *handle, wildriver_ind_t const *rowptr, wildriver_dim_t const *rowind, wildriver_val_t const *rowval, double *progress) |
| Save the matrix after setting nrows, ncols, and nnz in the handle. More... | |
| void | wildriver_close_matrix (wildriver_matrix_handle *handle) |
| Close an open matrix. More... | |
| wildriver_graph_handle * | wildriver_open_graph (char const *fname, int mode) |
| Open a graph for reading. The returned handle must be closed. More... | |
| int | wildriver_load_graph (wildriver_graph_handle *handle, wildriver_ind_t *xadj, wildriver_dim_t *adjncy, wildriver_val_t *vwgt, wildriver_val_t *adjwgt, double *progress) |
| Load the graph into the given memory locations. More... | |
| void | wildriver_close_graph (wildriver_graph_handle *handle) |
| Close an open graph. More... | |
| wildriver_vector_handle * | wildriver_open_vector (char const *fname, int mode) |
| Open a vector for reading. The returned handle must be closed. More... | |
| int | wildriver_load_vector (wildriver_vector_handle *handle, wildriver_val_t *vals, double *progress) |
| Load a vector into the given memory location. More... | |
| int | wildriver_save_vector (wildriver_vector_handle *handle, wildriver_val_t const *vals, double *progress) |
| Save a vactor from the given memory location. More... | |
| void | wildriver_close_vector (wildriver_vector_handle *handle) |
| Close an open vector. More... | |
| int | wildriver_read_matrix (char const *fname, wildriver_dim_t *r_nrows, wildriver_dim_t *r_ncols, wildriver_ind_t *r_nnz, wildriver_ind_t **r_rowptr, wildriver_dim_t **r_rowind, wildriver_val_t **r_rowval) |
| Read a matrix from the given path into a CSR data-structure. More... | |
| int | wildriver_write_matrix (char const *fname, wildriver_dim_t nrows, wildriver_dim_t ncols, wildriver_ind_t nnz, wildriver_ind_t const *rowptr, wildriver_dim_t const *rowind, wildriver_val_t const *rowval) |
| Write a matrix file to the given path from a CSR data-structure. More... | |
| int | wildriver_read_graph (char const *fname, wildriver_dim_t *r_nvtxs, wildriver_ind_t *r_nedges, int *r_nvwgts, int *r_ewgts, wildriver_ind_t **r_xadj, wildriver_dim_t **r_adjncy, wildriver_val_t **r_vwgt, wildriver_val_t **r_adjwgt) |
| Read a graph from the given path into a CSR data-structure. More... | |
| int | wildriver_write_graph (char const *fname, wildriver_dim_t nvtxs, wildriver_ind_t nedges, int nvwgts, wildriver_ind_t const *xadj, wildriver_dim_t const *adjncy, wildriver_val_t const *vwgt, wildriver_val_t const *adjwgt) |
| Write a graph to the given path from a CSR data-structure. More... | |
Top level C include for WildRiver.
| #define WILDRIVER_DIMENSION_TYPE uint32_t |
| #define WILDRIVER_INDEX_TYPE size_t |
| #define WILDRIVER_VALUE_TYPE double |
| #define WILDRIVER_VER_MAJOR 1 |
| #define WILDRIVER_VER_MINOR 0 |
| #define WILDRIVER_VER_SUBMINOR 0 |
| typedef WILDRIVER_INDEX_TYPE wildriver_ind_t |
| typedef WILDRIVER_VALUE_TYPE wildriver_val_t |
| enum wildriver_format_t |
| enum wildriver_mode_t |
| void wildriver_close_graph | ( | wildriver_graph_handle * | handle | ) |
Close an open graph.
| handle | The open graph. |
| void wildriver_close_matrix | ( | wildriver_matrix_handle * | handle | ) |
Close an open matrix.
| handle | The open matrix. |
| void wildriver_close_vector | ( | wildriver_vector_handle * | handle | ) |
Close an open vector.
| handle | The open vector. |
| int wildriver_load_graph | ( | wildriver_graph_handle * | handle, |
| wildriver_ind_t * | xadj, | ||
| wildriver_dim_t * | adjncy, | ||
| wildriver_val_t * | vwgt, | ||
| wildriver_val_t * | adjwgt, | ||
| double * | progress | ||
| ) |
Load the graph into the given memory locations.
| handle | The pointer to the open graph. |
| xadj | The edge list pointer indicating where each vertex's edges start in the edge list. |
| adjncy | The edge list. |
| vwgt | The weight of each vertex. |
| adjwgt | The weight of each edge. |
| progress | The memory address to write progress updates to (can be null). |
| int wildriver_load_matrix | ( | wildriver_matrix_handle * | handle, |
| wildriver_ind_t * | rowptr, | ||
| wildriver_dim_t * | rowind, | ||
| wildriver_val_t * | rowval, | ||
| double * | progress | ||
| ) |
Load the matrix into the given memory locations.
| handle | The pointer to the open matrix. |
| rowptr | The the starting index for each row (must be of length nrows+1). |
| rowind | The column indices for entries in each row (must be of length nnz)). |
| rowval | The value of the entries in each row (must be of length nnz). |
| progress | A variable to update as the matrix is loaded (will start at 0 and go to 1.0 when the matrix is fully loaded). This may be null if progress tracking is not required. |
| int wildriver_load_vector | ( | wildriver_vector_handle * | handle, |
| wildriver_val_t * | vals, | ||
| double * | progress | ||
| ) |
Load a vector into the given memory location.
| handle | The handle of the open vector. |
| vals | The memory location to load the vector to. |
| progress | A variable to update as the vector is loaded (will start at 0 and go to 1.0 when the vector is fully loaded). This may be null if progress tracking is not required. |
| wildriver_graph_handle* wildriver_open_graph | ( | char const * | fname, |
| int | mode | ||
| ) |
Open a graph for reading. The returned handle must be closed.
| fname | The filename/path of the graph file. |
| mode | The mode to open the file in (WILDRIVER_IN or WILDRIVER_OUT). |
| wildriver_matrix_handle* wildriver_open_matrix | ( | char const * | fname, |
| int | mode | ||
| ) |
Open a matrix for reading. The returned handle must be closed.
| fname | The filename/path of the matrix file. |
| mode | The mode to open the file in (WILDRIVER_IN or WILDRIVER_OUT). |
| wildriver_vector_handle* wildriver_open_vector | ( | char const * | fname, |
| int | mode | ||
| ) |
Open a vector for reading. The returned handle must be closed.
| fname | The filename/path of the vector file. |
| mode | The mode to open the file in (WILDRIVER_IN or WILDRIVER_OUT). |
| int wildriver_read_graph | ( | char const * | fname, |
| wildriver_dim_t * | r_nvtxs, | ||
| wildriver_ind_t * | r_nedges, | ||
| int * | r_nvwgts, | ||
| int * | r_ewgts, | ||
| wildriver_ind_t ** | r_xadj, | ||
| wildriver_dim_t ** | r_adjncy, | ||
| wildriver_val_t ** | r_vwgt, | ||
| wildriver_val_t ** | r_adjwgt | ||
| ) |
Read a graph from the given path into a CSR data-structure.
| fname | The filename/path of the graph file. |
| r_nvtxs | The number of vertices in the graph (output). |
| r_nedges | The number of edges in the graph (output, optional). |
| r_nvwgts | The number of vertex weights in the graph (output, optional). |
| r_ewgts | Whether or not edge weights are present in the graph file (output, optional). |
| r_xadj | The adjacency list pointer (output). |
| r_adjncy | The adjacency list (output). |
| r_vwgt | The vertex weights (output, optional). |
| r_adjwgt | The edge weights (output, optional). |
| int wildriver_read_matrix | ( | char const * | fname, |
| wildriver_dim_t * | r_nrows, | ||
| wildriver_dim_t * | r_ncols, | ||
| wildriver_ind_t * | r_nnz, | ||
| wildriver_ind_t ** | r_rowptr, | ||
| wildriver_dim_t ** | r_rowind, | ||
| wildriver_val_t ** | r_rowval | ||
| ) |
Read a matrix from the given path into a CSR data-structure.
| fname | The filename/path of the matrix file. |
| r_nrows | The number of rows in the matrix (output). |
| r_ncols | The number of columns in the matrix (output). |
| r_nnz | The number of non-zeros in the matrix (output). |
| r_rowptr | The the starting index for each row (output). |
| r_rowind | The column indices for entries in each row (output). |
| r_rowval | The value of the entries in each row (output). |
| int wildriver_save_matrix | ( | wildriver_matrix_handle * | handle, |
| wildriver_ind_t const * | rowptr, | ||
| wildriver_dim_t const * | rowind, | ||
| wildriver_val_t const * | rowval, | ||
| double * | progress | ||
| ) |
Save the matrix after setting nrows, ncols, and nnz in the handle.
| handle | The pointer to the open matrix. |
| rowptr | The the starting index for each row (must be of length nrows+1). |
| rowind | The column indices for entries in each row (must be of length nnz)). |
| rowval | The value of the entries in each row (must be of length nnz). |
| progress | A variable to update as the matrix is saved (will start at 0 and go to 1.0 when the matrix is fully saved). This may be null if progress tracking is not required. |
| int wildriver_save_vector | ( | wildriver_vector_handle * | handle, |
| wildriver_val_t const * | vals, | ||
| double * | progress | ||
| ) |
Save a vactor from the given memory location.
| handle | The handle to the open vector. |
| vals | The memory location of the vector to write. |
| progress | A variable to update as the vector is saved (will start at 0 and go to 1.0 when the vector is fully saved). This may be null if progress tracking is not required. |
| int wildriver_write_graph | ( | char const * | fname, |
| wildriver_dim_t | nvtxs, | ||
| wildriver_ind_t | nedges, | ||
| int | nvwgts, | ||
| wildriver_ind_t const * | xadj, | ||
| wildriver_dim_t const * | adjncy, | ||
| wildriver_val_t const * | vwgt, | ||
| wildriver_val_t const * | adjwgt | ||
| ) |
Write a graph to the given path from a CSR data-structure.
| fname | The filename/path of the graph file. |
| nvtxs | The number of vertices in the graph. |
| nedges | The number of edges in the graph. |
| nvwgts | The number of vertex weights. |
| xadj | The adjacency list pointer. |
| adjncy | The adjacency list. |
| vwgt | The vertex weights. |
| adjwgt | The edge weights. |
| int wildriver_write_matrix | ( | char const * | fname, |
| wildriver_dim_t | nrows, | ||
| wildriver_dim_t | ncols, | ||
| wildriver_ind_t | nnz, | ||
| wildriver_ind_t const * | rowptr, | ||
| wildriver_dim_t const * | rowind, | ||
| wildriver_val_t const * | rowval | ||
| ) |
Write a matrix file to the given path from a CSR data-structure.
| fname | The filename/path of the matrix file. |
| nrows | The number of rows in the matrix. |
| ncols | The number of columns in the matrix. |
| nnz | The number of non-zeros in the matrix. |
| rowptr | The starting index for each row. |
| rowind | The column indices for entries in each row. |
| rowval | The value of the entries in each row. |
1.8.11