File tree Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef CBLAS_H
2
2
#define CBLAS_H
3
3
#include <stddef.h>
4
+ #include <stdint.h>
4
5
5
6
6
7
#ifdef __cplusplus
@@ -15,10 +16,12 @@ extern "C" { /* Assume C declarations for C++ */
15
16
/*
16
17
* Integer type
17
18
*/
19
+ #ifndef CBLAS_INT
18
20
#ifdef WeirdNEC
19
- #define CBLAS_INT long
21
+ #define CBLAS_INT int64_t
20
22
#else
21
- #define CBLAS_INT int
23
+ #define CBLAS_INT int32_t
24
+ #endif
22
25
#endif
23
26
24
27
typedef enum CBLAS_LAYOUT {CblasRowMajor = 101 , CblasColMajor = 102 } CBLAS_LAYOUT ;
Original file line number Diff line number Diff line change 10
10
#define CBLAS_F77_H
11
11
12
12
#include <stdarg.h>
13
+ #include <stdint.h>
13
14
14
15
/* It seems all current Fortran compilers put strlen at end.
15
16
* Some historical compilers put strlen after the str argument
24
25
#define F77_STRLEN (a ) (_fcdlen)
25
26
#endif
26
27
28
+ #ifndef F77_INT
27
29
#ifdef WeirdNEC
28
- #define F77_INT long
30
+ #define F77_INT int64_t
29
31
#else
30
- #define F77_INT int
32
+ #define F77_INT int32_t
33
+ #endif
31
34
#endif
32
35
33
36
#ifdef F77_CHAR
Original file line number Diff line number Diff line change @@ -14,6 +14,19 @@ macro( CheckLAPACKCompilerFlags )
14
14
15
15
set ( FPE_EXIT FALSE )
16
16
17
+ # FORTRAN ILP default
18
+ if ( FORTRAN_ILP )
19
+ if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" )
20
+ if ( WIN32 )
21
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /integer-size:64" )
22
+ else ()
23
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -integer-size 64" )
24
+ endif ()
25
+ else ()
26
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-integer-8" )
27
+ endif ()
28
+ endif ()
29
+
17
30
# GNU Fortran
18
31
if ( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
19
32
if ( "${CMAKE_Fortran_FLAGS} " MATCHES "-ffpe-trap=[izoupd]" )
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ if(BUILD_INDEX64)
53
53
set (LAPACKELIB "lapacke64" )
54
54
set (TMGLIB "tmglib64" )
55
55
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWeirdNEC -DLAPACK_ILP64 -DHAVE_LAPACK_CONFIG_H" )
56
- set (CMAKE_Fortran_FLAGS " ${CMAKE_Fortran_FLAGS} -fdefault-integer-8" )
56
+ set (FORTRAN_ILP TRUE )
57
57
else ()
58
58
set (BLASLIB "blas" )
59
59
set (CBLASLIB "cblas" )
Original file line number Diff line number Diff line change @@ -41,12 +41,13 @@ extern "C" {
41
41
#endif /* __cplusplus */
42
42
43
43
#include < stdlib.h>
44
+ #include < stdint.h>
44
45
45
46
#ifndef lapack_int
46
47
#if defined(LAPACK_ILP64)
47
- #define lapack_int long
48
+ #define lapack_int int64_t
48
49
#else
49
- #define lapack_int int
50
+ #define lapack_int int32_t
50
51
#endif
51
52
#endif
52
53
You can’t perform that action at this time.
0 commit comments