Download Users` Guide to NetSolve V1.4 - Innovative Computing Laboratory

Transcript
Chapter 17. The Problem Description File
then,
val:
1 3 1 5 2 6 1 8 4
col_ind: 0 2 3 2 3 0 1 3 0
row_ptr: 0 3 5 8 9
Thus, if a problem in NetSolve has the following specifications:
-- sm_prob -* 1 object in INPUT
- input 0: Sparse Matrix Double Precision Real.
the sparse matrix
* Calling sequence from C or Fortran
11 arguments
- Argument #0:
- number of rows of input object #0 (sm)
- number of columns of input object #0 (sm)
- Argument #1:
- number of non-zero values of input object #0 (sm)
- Argument #2:
- pointer to input object #0 (sm)
- Argument #3:
- column indices of non-zeros of input object #0 (sm)
- Argument #4:
- row pointers of the sparse matrix #0 (sm)
a Matlab user would call this program as:
>> netsolve(’sm_prob’, SM);
where SM is a Matlab constructed sparse matrix object.
and a C user would invoke this problem as:
double* val;
int* col_index;
int* row_ptr;
125