File tree Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Expand file tree Collapse file tree 5 files changed +27
-6
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
@@ -11,9 +12,9 @@ extern "C" { /* Assume C declarations for C++ */
11
12
* Enumerated and derived types
12
13
*/
13
14
#ifdef WeirdNEC
14
- #define CBLAS_INDEX long
15
+ #define CBLAS_INDEX int64_t
15
16
#else
16
- #define CBLAS_INDEX int
17
+ #define CBLAS_INDEX int32_t
17
18
#endif
18
19
19
20
typedef enum {CblasRowMajor = 101 , CblasColMajor = 102 } CBLAS_LAYOUT ;
Original file line number Diff line number Diff line change 9
9
#ifndef CBLAS_F77_H
10
10
#define CBLAS_F77_H
11
11
12
+ #include <stdint.h>
13
+
12
14
#ifdef CRAY
13
15
#include <fortran.h>
14
16
#define F77_CHAR _fcd
17
19
#define F77_STRLEN (a ) (_fcdlen)
18
20
#endif
19
21
22
+ #ifndef F77_INT
20
23
#ifdef WeirdNEC
21
- #define F77_INT long
24
+ #define F77_INT int64_t
25
+ #else
26
+ #define F77_INT int32_t
27
+ #endif
22
28
#endif
23
29
24
30
#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 @@ -49,12 +49,13 @@ extern "C" {
49
49
#endif /* __cplusplus */
50
50
51
51
#include < stdlib.h>
52
+ #include < stdint.h>
52
53
53
54
#ifndef lapack_int
54
55
#if defined(LAPACK_ILP64)
55
- #define lapack_int long
56
+ #define lapack_int int64_t
56
57
#else
57
- #define lapack_int int
58
+ #define lapack_int int32_t
58
59
#endif
59
60
#endif
60
61
You can’t perform that action at this time.
0 commit comments