ALP User Documentation 0.7.alpha
Algebraic Programming User Documentation
|
This is an ALP-specific extension to the NIST Sparse BLAS standard, which the ALP libsparseblas transition path also introduces to the de-facto spblas standard. More...
Go to the source code of this file.
Typedefs | |
typedef void * | extblas_sparse_vector |
A sparse vector. | |
Functions | |
extblas_sparse_vector | EXTBLAS_dusv_begin (const int n) |
Creates a handle to a new sparse vector that holds no entries. | |
int | EXTBLAS_dusv_clear (extblas_sparse_vector x) |
Removes all entries from a finalised sparse vector. | |
int | EXTBLAS_dusv_close (const extblas_sparse_vector x) |
Closes a sparse vector read-out. | |
int | EXTBLAS_dusv_end (extblas_sparse_vector x) |
Signals the end of sparse vector construction, making the given vector ready for use. | |
int | EXTBLAS_dusv_get (const extblas_sparse_vector x, double *const val, int *const ind) |
Retrieves a sparse vector entry. | |
int | EXTBLAS_dusv_insert_entry (extblas_sparse_vector x, const double val, const int index) |
Inserts a new nonzero entry into a sparse vector that is under construction. | |
int | EXTBLAS_dusv_nz (const extblas_sparse_vector x, int *nz) |
Retrieves the number of nonzeroes in a given finalised sparse vector. | |
int | EXTBLAS_dusv_open (const extblas_sparse_vector x) |
Opens a sparse vector for read-out. | |
int | EXTBLAS_dusvds (extblas_sparse_vector x) |
Destroys the given sparse vector. | |
This is an ALP-specific extension to the NIST Sparse BLAS standard, which the ALP libsparseblas transition path also introduces to the de-facto spblas standard.
typedef void* extblas_sparse_vector |
A sparse vector.
This is an implementation-specific extension.
extblas_sparse_vector EXTBLAS_dusv_begin | ( | const int | n | ) |
Creates a handle to a new sparse vector that holds no entries.
This is an implementation-specific extension.
[in] | n | The returned vector size. |
int EXTBLAS_dusv_clear | ( | extblas_sparse_vector | x | ) |
Removes all entries from a finalised sparse vector.
[in] | x | The vector to clear. |
This is an implementation-specific extension.
int EXTBLAS_dusv_close | ( | const extblas_sparse_vector | x | ) |
Closes a sparse vector read-out.
[in] | x | The vector which is in a read-out state. |
This is an implementation-specific extension.
int EXTBLAS_dusv_end | ( | extblas_sparse_vector | x | ) |
Signals the end of sparse vector construction, making the given vector ready for use.
[in,out] | x | The sparse vector that is under construction. |
This is an implementation-specific extension.
int EXTBLAS_dusv_get | ( | const extblas_sparse_vector | x, |
double *const | val, | ||
int *const | ind | ||
) |
Retrieves a sparse vector entry.
Each call to this function will retrieve a new entry. The order in which entries are returned is unspecified.
[in] | x | The vector to retrieve an entry of. |
The given vector must be opened for read-out, and must not have been closed in the mean time.
[out] | val | The value of the retrieved nonzero. |
[out] | ind | The index of the retrieved nonzero value. |
In case of error, the output memory areas pointed to by val and ind shall remain untouched. Furthermore, x will no longer be a valid argument for a call to this function.
This is an implementation-specific extension.
int EXTBLAS_dusv_insert_entry | ( | extblas_sparse_vector | x, |
const double | val, | ||
const int | index | ||
) |
Inserts a new nonzero entry into a sparse vector that is under construction.
[in,out] | x | The sparse vector to which to add a nonzero. |
[in] | val | The nonzero to add to x. |
[in] | index | The nonzero coordinate. |
The value index must be smaller than the size of the vector x as given during the call to EXTBLAS_dusv_begin that returned x.
This is an implementation-specific extension.
int EXTBLAS_dusv_nz | ( | const extblas_sparse_vector | x, |
int * | nz | ||
) |
Retrieves the number of nonzeroes in a given finalised sparse vector.
[in] | x | The vector of which to return the number of nonzeroes. |
[out] | nz | Where to store the number of nonzeroes in a given sparse vector. |
This is an implementation-specific extension.
int EXTBLAS_dusv_open | ( | const extblas_sparse_vector | x | ) |
Opens a sparse vector for read-out.
[in] | x | The vector to read out. |
After a successful call to this function, x moves into a read-out state. This means x shall only be a valid argument for calls to EXTBLAS_dusv_get and EXTBLAS_dusv_close.
This is an implementation-specific extension.
int EXTBLAS_dusvds | ( | extblas_sparse_vector | x | ) |
Destroys the given sparse vector.
[in] | x | The finalised sparse vector to destroy. |
This is an implementation-specific extension.