Skip to content

Commit

Permalink
Add some simple API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
DanecLacey committed Apr 25, 2024
1 parent b693632 commit 9f60181
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions API_doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ultimate-SpMV interface documentation

## Introduction
The interface for USpMV is a single header file, interface.hpp, which contains everything you need.
As it currently stands, the functions in the API don't have or need any awareness of MPI. The organization of communication information should be done by the host application, and these routines are used on each MPI process locally.

## Structs
- <strong>MtxData</strong> is the COO matrix structure, e.g. which is read into from an .mtx file.
- <strong>ScsData</strong> is the SELL-C-sigma matrix structure, e.g. which returned after a COO matrix has been processed with the <strong>convert_to_scs</strong> function.

## Functions
- <strong>convert_to_scs</strong>
- Main routine. Converts a COO matrix (in this case, stored in the MtxData struct) into a Sell-C-sigma matrix. Parametarized by C and sigma.
- <strong>apply_permutation</strong>
- Useful function to apply a permutation (e.g. the permutation vector obtained from permuting the rows/columns of your Sell-C-simga matrix) to a vector (e.g. the x vector for computing Ax=y)
- <strong>permute_scs_cols</strong>
- Permute the columns of your Sell-C-sigma matrix, i.e. for symmetric permutations
- <strong>spmv_omp_scs</strong>
- The Sell-C-sigma SpMV kernel.
- <strong>spmv_omp_csr</strong>
- A CRS format SpMV kernel to use as a reference.

## Notes
- GPGPU support coming soon
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Ultimate-SpMV
## MPI+X SpMV with SELL-C-sigma format

Can be run as a standalone benchmarking harness, or as a library. See API_doc.md for information about the interface.

Example:\
```mpirun -n 4 ./uspmv <matrix_name>.mtx <kernel_format> <options>```

Expand Down

0 comments on commit 9f60181

Please sign in to comment.