-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagma_mangling.h
36 lines (32 loc) · 1.24 KB
/
magma_mangling.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
-- MAGMA (version 1.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date
*/
#ifndef MAGMA_MANGLING_H
#define MAGMA_MANGLING_H
#include "mangling.h"
/* Define how to name mangle Fortran names.
* If using CMake, it defines MAGMA_GLOBAL in mangling.h
* Otherwise, the make.inc file should have one of -DADD_, -DNOCHANGE, or -DUPCASE.
* If using outside of MAGMA, put one of those in your compiler flags (e.g., CFLAGS).
* These macros are used in:
* include/magma_*lapack.h
* control/magma_*f77.cpp
*/
#ifndef MAGMA_FORTRAN_NAME
#if defined(MAGMA_GLOBAL)
#define FORTRAN_NAME(lcname, UCNAME) MAGMA_GLOBAL( lcname, UCNAME )
#elif defined(ADD_)
#define FORTRAN_NAME(lcname, UCNAME) lcname##_
#elif defined(NOCHANGE)
#define FORTRAN_NAME(lcname, UCNAME) lcname
#elif defined(UPCASE)
#define FORTRAN_NAME(lcname, UCNAME) UCNAME
#else
#error "One of ADD_, NOCHANGE, or UPCASE must be defined to set how Fortran functions are name mangled. For example, in MAGMA, add -DADD_ to CFLAGS, FFLAGS, etc. in make.inc. If using CMake, it defines MAGMA_GLOBAL instead."
#endif
#endif
#endif // #ifndef MAGMA_MANGLING_H