libflame
revision_anchor
|
00001 /* 00002 00003 Copyright (C) 2014, The University of Texas at Austin 00004 00005 This file is part of libflame and is available under the 3-Clause 00006 BSD license, which can be found in the LICENSE file at the top-level 00007 directory, or at http://opensource.org/licenses/BSD-3-Clause 00008 00009 */ 00010 00011 // --- Define Fortran name-mangling macro -------------------------------------- 00012 00013 // If the F77_FUNC name-mangling macro is undefined, then we we need to define 00014 // it ourselves. 00015 #ifndef F77_FUNC 00016 00017 // Case 1: F77_FUNC is undefined because we're building for Windows. 00018 #ifdef FLA_ENABLE_WINDOWS_BUILD 00019 00020 // Check whether we need to use uppercase BLAS routine names; otherwise 00021 // default to lowercase. 00022 #ifdef FLA_ENABLE_UPPERCASE_BLAS 00023 00024 // Use uppercase routine names (no underscore). 00025 #define F77_FUNC( name_lower, name_upper ) \ 00026 name_upper 00027 #else 00028 00029 // Use lowercase routine names (no underscore). 00030 #define F77_FUNC( name_lower, name_upper ) \ 00031 name_lower 00032 #endif 00033 00034 // Case 2: F77_FUNC is undefined because we're in a Linux-like environment 00035 // that did not define it for us. 00036 #else 00037 00038 // Check whether we need to use uppercase BLAS routine names; otherwise 00039 // default to lowercase. 00040 #ifdef FLA_ENABLE_UPPERCASE_BLAS 00041 00042 // Use uppercase routine names (single underscore). 00043 #define F77_FUNC( name_lower, name_upper ) \ 00044 name_upper ## _ 00045 #else 00046 00047 // Use lowercase routine names (single underscore). 00048 #define F77_FUNC( name_lower, name_upper ) \ 00049 name_lower ## _ 00050 #endif 00051 00052 #endif // #ifdef FLA_ENABLE_WINDOWS_BUILD 00053 00054 #endif // #ifndef F77_FUNC 00055