Sun S3L 3.0 Programming and Reference Guide

S3L_get_attribute

Description

S3L_get_attribute returns a requested attribute of an S3L dense array or sparse matrix. The user specifies one of a set of predefined req_attr values and, on return, the integer value of the requested attribute is stored in attr. For attributes associated with array axes--such as the extents or blocksizes of an array--the user specifies the axis as well.

The req_attr entry must be one of the following:

For an S3L sparse matrix stored in the S3L_SPARSE_CSR format, S3L_RIDX_SGRID_ADDR returns in attr the starting address of an array containing the pointers to the beginning of each row of the local submatrix (per-process).

Note: Users must not change the data returned in attr. It is created for internal use only.

Note: User must not change the data returned in attr. It is created for internal use only.

For an S3L sparse matrix stored in the S3L_SPARSE_CSR format, S3L_RIDX_SGRID_SIZE returns in attr the size of an array containing the pointers to the beginning of each row of the local submatrix (per-process).

Syntax

The C and Fortran syntax for S3L_get_attribute are shown below.

C/C++ Syntax


Example 7-39

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_S3L_get_attribute(a, req_attr, axis, attr)
    S3L_array_t           a
    int                   req_attr
    int                   axis
    void                  *attr

F77/F90 Syntax


Example 7-40

include `s3l/s3l-f.h'
include `s3l/s3l_errno-f.h'
subroutine
S3L_get_attribute(a, req_attr, axis, attr, ier)
    integer*8          a
    integer*4          req_attr
    integer*4          axis
    <type>             attr
    integer*4          ier

where <type> is either of integer*4 type or of pointer type. When attr is an address, it should be of type pointer. In all other cases, it should be of type integer*4.

Input

S3L_get_attribute accepts the following arguments as input:

Output

S3L_get_attribute uses the following argument for output:

Error Handling

On success, S3L_get_attribute returns S3L_SUCCESS.

S3L_get_attribute performs generic checking of the validity of the arrays it accepts 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 condition will cause the function to terminate and return the associated error code:

Examples

../examples/s3l/utils/get_attribute.c
../examples/s3l/utils-f/get_attribute.f

Related Functions

S3L_set_array_element(3)
S3L_set_array_element_on_proc(3)