S3L_acorr_setup sets up the initial conditions necessary for computation of the autocorrelation C = acorr(A). It returns an integer setup value that can be used by subsequent calls to S3L_acorr and S3L_acorr_free_setup.
The C and Fortran syntax for S3L_acorr_setup are shown below.
#include <s3l/s3l-c.h> #include <s3l/s3l_errno-c.h> int S3L_acorr_setup(a, c, setup_id) S3L_array_t a S3L_array_t c int setup_id <type> *rparm |
include `s3l/s3l-f.h' include `s3l/s3l_errno-f.h' subroutine S3L_acorr_setup(a, c, setup_id, ier) integer*8 a integer*8 c integer*4 setup_id integer*4 ier |
where <type> is real*4 or real*8 for both C/C++ and F77/F90.
a - S3L internal array handle for the parallel 1D or 2D array of real or complex type whose autocorrelation is to be computed.
c - S3L internal array handle for the parallel 1D or 2D array of the same type as A, used to store the result of the autocorrelation. Its extents along each axis must be at least equal to two times the corresponding extent of A minus 1.
This function uses the following arguments for output:
setup - Integer value retuned by this function. Use this value for the setup_id argument in subsequent calls to S3_acorr and S3L_acorr_free_setup.
ier (Fortran only) - When called from a Fortran program, this function returns error status in ier.
On success, S3L_acorr_setup returns S3L_SUCCESS.
S3L_acorr_setup performs generic checking 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 cause the function to terminate and return one of the following codes:
S3L_ERR_ARG_DTYPE - The data type of one of the array arguments is invalid. It must be one of:
S3L_float
S3L_double
S3L_complex
S3L_double_complex
S3L_ERR_MATCH_DTYPE - The array arguments are not all of the same type.
S3L_ERR_MATCH_RANK - The array arguments are not all of the same rank.
S3L_ERR_ARG_RANK - The rank of one of the array arguments is not 1 or 2.
S3L_ERR_ARG_EXTENTS - The extents of c are less than the extents of a.
../examples/s3l/acorr/ex_acorr.c ../examples/s3l/acorr-f/ex_acorr.f
S3L_acorr(3) S3L_acorr_free_setup(3)