00001 /* 00002 libflame 00003 An object-based infrastructure for developing high-performance 00004 dense linear algebra libraries. 00005 00006 Copyright (C) 2009, The University of Texas 00007 00008 libflame is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU Lesser General Public License as 00010 published by the Free Software Foundation; either version 2.1 of 00011 the License, or (at your option) any later version. 00012 00013 libflame is distributed in the hope that it will be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with libflame; if you did not receive a copy, see 00020 http://www.gnu.org/licenses/. 00021 00022 For more information, please contact us at flame@cs.utexas.edu or 00023 send mail to: 00024 00025 Field G. Van Zee and/or 00026 Robert A. van de Geijn 00027 The University of Texas at Austin 00028 Department of Computer Sciences 00029 1 University Station C0500 00030 Austin TX 78712 00031 */ 00032 00033 // Define a Fortran integer type 00034 #define F_INT int 00035 00036 // Define a Fortran double precision floating point type 00037 #define F_DOUBLE double 00038 00039 // Windows has weird underscoring. Handle this separately. 00040 #ifdef FLA_ENABLE_WINDOWS_BUILD 00041 00042 #define FLA_C2F( name ) name 00043 #define FLA_F2C( name ) name 00044 00045 #else // Linux case 00046 00047 // Handle the various scenarios for Fortran underscoring with respect to the 00048 // FLA_C2F and FLA_F2C macros. 00049 #ifdef FLA_F77_UNDERSCORE 00050 #ifdef FLA_F77_EXTRA_UNDERSCORE 00051 00052 // Case 1: configure detected that the Fortran 77 compiler employs both 00053 // an underscore for Fortran symbols as well as an extra underscore in 00054 // symbol names that already contain at least one underscore. 00055 #define FLA_C2F( name ) name ## _ 00056 #define FLA_F2C( name ) name ## __ 00057 00058 #else 00059 00060 // Case 2: configure detected that the Fortran 77 compiler employs only 00061 // an underscore for Fortran symbols (and no additional underscores). 00062 #define FLA_C2F( name ) name ## _ 00063 #define FLA_F2C( name ) name ## _ 00064 00065 #endif 00066 #else 00067 #ifdef FLA_F77_EXTRA_UNDERSCORE 00068 00069 // Case 3: configure detected that the Fortran 77 compiler employs only 00070 // an extra underscore for Fortran symbols that already contain at least 00071 // least one underscore. This case seems awkward, but it has been placed 00072 // here anyway for completeness. The macros below may not be correct 00073 // depending on the meaning of the "no underscore, extra underscore" 00074 // result from configure. 00075 #define FLA_C2F( name ) name 00076 #define FLA_F2C( name ) name ## __ 00077 00078 #else 00079 00080 // Case 4: configure detected that the Fortran 77 compiler employs neither 00081 // an underscore for Fortran symbols nor an extra underscore in symbol 00082 // names that already contain at least one underscore. Another strange 00083 // scenario, and so the macros below are configured somewhat speculatively. 00084 #define FLA_C2F( name ) name 00085 #define FLA_F2C( name ) name 00086 00087 #endif 00088 #endif 00089 #endif