Main Page | File List | Globals

rcm_f77.c File Reference


Detailed Description

Version 0.9. September 21, 2005.

This file provides two interface/wrapper functions to call genrcmi()/genrcml() from Fortran programs. GENRCM is intended to be a drop-in replacement for the SPARSPAK version. GENRCM2 adds some of the additional features of rcm.c.

As the C Compiler does not know about Fortran, several preprocessor symbols are used to give this knowledge to the Fortran compiler.

F77_INT [default: int]
if defined it should expand to the name of the C type to be used to represent the Fortran integer type. Note: The C interface is only compiled for int and long. Hence the compilation will likely fail or result in a faulty program if you define F77_INT to anything different from int or long.
F77_GENRCMI
the name of the C function to call. If you define F77_INT outside this file, you also have to define F77_GENRCMI, either to genrcmi or genrcml. If RCM_PREFIX is set, the prefix is added automatically. Do not add the prefix manually to the definition of F77_GENRCMI, this would only result in errors.

F77_FUNC(name,NAME)
a macro taking two arguments and resulting in the external name (used in *.o files) the Fortran compiler gives to the Fortran function/subroutine NAME (which is also the external name of functions called by Fortran). Notice that if you use GNU Autoconf, just use AC_F77_WRAPPERS (see the section about Fortran 77 Compiler Characteristics in the Autoconf Manual for more details on AC_F77_WRAPPERS) to get a correct definition for F77_FUNC.

If this macro is not defined, a heuristic is used to define it. The default behavior is to use the lowercase name and add a single underscore, e.g., F77_FUNC(genrcm,GENRCM) would become genrcm_. This seems to be the most common style (and is the one used by g77 and gfortran). Several other schemes can be selected by defining one or several of the following symbols:

__2UNDERSCORE__
Add TWO underscores to the name. F77_FUNC(genrcm,GENRCM) becomes genrcm__ or GENRCM__.

__UNDERSCORE__ or ADD_ [default behavior]
Add ONE underscore. F77_FUNC(genrcm,GENRCM) becomes genrcm_ or GENRCM_.

__NOCHANGE__ or NOCHANGE
Don't add underscores. F77_FUNC(genrcm,GENRCM) becomes genrcm or GENRCM.

UPCASE or __CAPS__
Use the uppercase version of the name. F77_FUNC(genrcm,GENRCM) becomes GENRCM, GENRCM_ or GENRCM__, depending on the underscore-adding preprocessor symbols.

Definition in file rcm_f77.c.

#include "rcm.h"

Go to the source code of this file.

Functions

void GENRCM (F77_INT *n, F77_INT *xadj, F77_INT *adj, F77_INT *perm, F77_INT *mask, F77_INT *deg)
 Drop-in replacement for the SPARSPAK GENRCM subroutine.
void GENRCM2 (F77_INT *n, F77_INT *flags, F77_INT *xadj, F77_INT *adj, F77_INT *perm, F77_INT *mask, F77_INT *deg)
 Fortran callable wrapper to genrcmi()/genrcml().


Generated on Sat Sep 24 12:01:42 2005 for RCM by  doxygen 1.4.3-20050530