S3L_array_op1 applies a predefined unary (single-operand) operation to each element of an S3L parallel array. The S3L array handle argument, a, identifies the parallel array to be operated on and the op argument specifies the operation to be performed. The value of op must be:
S3L_OP_ABS - Replaces each element in a with its absolute value.
S3L_OP_MINUS - Replaces each element in a with its negative value.
S3L_OP_EXP - Replaces each element in the real or complex array a with its exponential.
The C and Fortran syntax for S3L_array_op1 are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_array_op1(a, op) S3L_array_t a int op |
include `s3l/s3l-f.h include `s3l/s3l_errno-f.h' subroutine S3L_array_op1(a, op, ier) integer*8 a integer*4 op integer*4 ier |
S3L_array_op1 accepts the following arguments as input:
a - S3L array handle for the parallel array on which the operation will be performed.
op - Predefined constant specifying the operation to be applied. See the Description section for details.
S3L_array_op1 uses the following argument for output:
ier (Fortran only) - When called from a Fortran program, S3L_array_op1 returns error status in ier.
On success, S3L_array_op1 returns S3L_SUCCESS.
S3L_array_op1 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.
S3L_ERR_ARG_DTYPE - op is equal to S3L_OP_EXP but a is of integer type.
../examples/s3l/fft/ex_fft1.c ../examples/s3l/deconv-f/ex_deconv.f
S3L_array_op2(3) S3L_array_scalar_op2(3) S3L_reduce_scalar(3)