Sun S3L 3.0 Programming and Reference Guide

S3L_matvec_sparse

Description

S3L_matvec_sparse computes the product of a global general sparse matrix with a global dense vector. The sparse matrix is described by the S3L array handle A. The global dense vector is described by the S3L array handle x. The result is stored in the global dense vector described by the S3L array handle y.

The array handle A is produced by a prior call to one of the following routines:

Syntax

The C and Fortran syntax for S3L_matvec_sparse are shown below.

C/C++ Syntax


Example 8-17

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_matvec_sparse(y, A, x)
    S3L_array_t               y
    S3L_array_t               A
    S3L_array_t               x

F77/F90 Syntax


Example 8-18

include `s3l/s3l-f.h'
include `s3l/s3l_errno-f.h'
subroutine
S3L_matvec_sparse(y, A, x, ier)
    integer*8               y
    integer*8               A
    integer*4               x
    integer*4               ier

Input

Output

These functions use the following arguments for output:

Error Handling

On success, S3L_matvec_sparse returns S3L_SUCCESS.

The S3L_matvec_sparse routines perform generic checking of the validity of the arrays they accept as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.

In addition, the following conditions will cause this function to terminate and return the associated error code:

Examples

../examples/s3l/sparse/ex_sparse.c
../examples/s3l/sparse-f/ex_sparse.f
../examples/s3l/iter/ex_iter.c
../examples/s3l/iter-f/ex_iter.f

Related Functions

S3L_declare_sparse(3)
S3L_read_sparse(3)
S3L_rand_sparse(3)