This section gives the general rules for setting up the ESSL calling sequences. The information given here applies to all types of programs, running in all environments. For a description and examples of how to code the ESSL calling sequences in your particular programming language, see the following sections:
For details on the conventions used in this book to describe the calling sequence syntax, see How to Interpret the Subroutine Descriptions. It describes how required and optional arguments are indicated in the calling sequence and the naming conventions used for different data types.
Some arguments are used for both input and output. The contents of the input argument are overlaid with the output value(s) on return to your program. Be careful that you save any data you need to preserve before calling the ESSL subroutine.
You should follow the syntax rules given for each argument in "On Entry" in the subroutine description. Input-argument error messages may be issued, and your program may terminate when you make an error specifying the input arguments. For example:
For most ESSL subroutines, if you specify 0 for the number of elements to be processed in a vector or the order of a matrix (usually argument n), no computation is performed. After checking for input-argument errors, the subroutine returns immediately and no result is returned. In the other subroutines, an error message may be issued.
When you specify a vector, matrix, or sequence in your calling sequence, it does not necessarily have to start at the beginning of the array. It can begin at any point in the array. For example, if you want vector x to start at element 3 in array A, which is declared A(1:12), specify A(3) in your calling sequence for argument x, such as in the following SASUM calling sequence in your Fortran program:
N X INCX | | | X = SASUM( 4 , A(3) , 2 )
Also, for example, if you want matrix A to start at the second row and third column of array A, which is declared A(0:10,2:8), specify A(1,4) in your calling sequence for argument a, such as in the following SGEADD calling sequence in your Fortran program:
A LDA TRANSA B LDB TRANSB C LDC M N | | | | | | | | | | CALL SGEADD( A(1,4) , 11 , 'N' , B , 4 , 'N' , C , 4 , 4 , 3 )
For more examples of specifying vectors and matrices, see Chapter 3, Setting Up Your Data Structures.