fortran.h

00001 /* MLPACK 0.2
00002  *
00003  * Copyright (c) 2008, 2009 Alexander Gray,
00004  *                          Garry Boyer,
00005  *                          Ryan Riegel,
00006  *                          Nikolaos Vasiloglou,
00007  *                          Dongryeol Lee,
00008  *                          Chip Mappus, 
00009  *                          Nishant Mehta,
00010  *                          Hua Ouyang,
00011  *                          Parikshit Ram,
00012  *                          Long Tran,
00013  *                          Wee Chin Wong
00014  *
00015  * Copyright (c) 2008, 2009 Georgia Institute of Technology
00016  *
00017  * This program is free software; you can redistribute it and/or
00018  * modify it under the terms of the GNU General Public License as
00019  * published by the Free Software Foundation; either version 2 of the
00020  * License, or (at your option) any later version.
00021  *
00022  * This program is distributed in the hope that it will be useful, but
00023  * WITHOUT ANY WARRANTY; without even the implied warranty of
00024  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00025  * General Public License for more details.
00026  *
00027  * You should have received a copy of the GNU General Public License
00028  * along with this program; if not, write to the Free Software
00029  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00030  * 02110-1301, USA.
00031  */
00038 #ifndef BASE_FORTRAN_H
00039 #define BASE_FORTRAN_H
00040 
00041 /* These typedefs should work for all machines I'm aware of. */
00042 
00044 typedef int f77_integer;
00046 typedef unsigned int f77_logical;
00048 typedef float f77_real;
00050 typedef double f77_double;
00051 
00058 typedef int f77_ret_void;
00060 typedef f77_integer f77_ret_integer;
00062 typedef f77_logical f77_ret_logical;
00069 typedef f77_double f77_ret_real;
00071 typedef f77_double f77_ret_double;
00072 
00074 typedef struct {
00075   f77_real re;
00076   f77_real im;
00077 } f77_complex;
00079 typedef struct {
00080   f77_double re;
00081   f77_double im;
00082 } f77_doublecomplex;
00083 
00085 typedef long f77_str_len;
00086 
00088 #define F77_FALSE ((f77_logical)0)
00089 
00090 #define F77_TRUE (~F77_FALSE)
00091 
00104 #define F77_FUNC(fname) fname ## _
00105 
00106 #ifdef __cplusplus
00107 #define F77_UNKNOWN_ARGS ...
00108 #else
00109 #define F77_UNKNOWN_ARGS
00110 #endif
00111 
00113 typedef f77_ret_integer (*f77_integer_func)( F77_UNKNOWN_ARGS );
00115 typedef f77_ret_logical (*f77_logical_func)( F77_UNKNOWN_ARGS );
00117 typedef f77_ret_real (*f77_real_func)( F77_UNKNOWN_ARGS );
00119 typedef f77_ret_double (*f77_double_func)( F77_UNKNOWN_ARGS );
00120 
00121 #endif /* BASE_FORTRAN_H */
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3