HP MLIB User's Guide Vol. 2 7th Ed.
Appendix A 1089
Header files
Header files
C header files for VECLIB are installed in /opt/mlib/include as file veclib.h.
Header file lapack.h is also provided for use with its associated libraries. The
following discussion applies to all these header files. Include the
−I/opt/mlib/include option on your C compiler command line to access the
C header files.
Use the #include directive to incorporate one of these header files into your
program, for example,
#include <veclib.h>
Each header file includes ANSI C function prototypes and PCC declarations for
all subprograms. Using the header files is optional but, if you do not use them,
you must declare the return value types of the functions you use or C treats
them as integers.
If you need to use more than one of the header files in a C program file, you can
include them in any order using #include.
The header files take care of many of the interlanguage programming rules
listed in the previous section. Consider the following header file entry for
VECLIB function DGEMM:
#ifndef DGEMM
#define DGEMM dgemm
#define dgemm_ dgemm
extern void dgemm (char* transa, char* transb, int* m, int* n,
int* k, double* alpha, double a[], int* lda,
double b[], int* ldb, double* beta, double c[],
int* ldc, int len_transa, int len_transb);
#endif
• The header file entry for each subprogram includes #define statements
that remove an underscore to the subprogram name if you code one. If you
code the subprogram name in upper case and omit the underscore, the name
is translated to lower case. To use the header file but omit some of the
function prototypes, #define the upper case form of the name before the
#include of the header file.
• The ANSI C function prototypes in the header files enforce call by address
by explicitly declaring every argument that is not an array is to be passed by
address.