Sun S3L 3.0 Programming and Reference Guide

S3L_reduce_axis

Description

S3L_reduce_axis applies a predefined reduction operation along a given axis of a parallel S3L array. If n is the rank (number of dimensions) of a, the result b is a parallel array of rank n-1. The argument op specifies the operation to be performed. The value of op must be one of:

Syntax

The C and Fortran syntax for S3L_reduce_axis are shown below.

C/C++ Syntax


Example 7-31

#include <s3l/s3l-c.h>
#include <s3l/s3l_errno-c.h>
int
S3L_reduce_axis(a, op, axis,
b)
    S3L_array_t           a
    S3L_op_type           op
    int                   axis
    S3L_array_t           b

F77/F90 Syntax


Example 7-32

include `s3l/s3l-f.h'
include `s3l/s3l_errno-f.h'
subroutine
S3L_reduce_axis(a, op, axis, b, ier)
    integer*8              a
    integer*4              op
    integer*4              axis
    integer*8              b
    integer*4              ier

Input

S3L_reduce_axis accepts the following arguments as input:

Output

S3L_reduce_axis uses the following arguments for output:

Error Handling

On success, S3L_reduce_axis returns S3L_SUCCESS.

S3L_reduce_axis 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 conditions will cause the function to terminate and return the associated error code:

Examples

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

Related Functions

S3L_reduce(3)