File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#ifndef CBLAS_H
22#define CBLAS_H
33#include <stddef.h>
4+ #include <stdint.h>
45
56
67#ifdef __cplusplus
@@ -11,9 +12,9 @@ extern "C" { /* Assume C declarations for C++ */
1112 * Enumerated and derived types
1213 */
1314#ifdef WeirdNEC
14- #define CBLAS_INDEX long
15+ #define CBLAS_INDEX int64_t
1516#else
16- #define CBLAS_INDEX int
17+ #define CBLAS_INDEX int32_t
1718#endif
1819
1920typedef enum {CblasRowMajor = 101 , CblasColMajor = 102 } CBLAS_LAYOUT ;
Original file line number Diff line number Diff line change 99#ifndef CBLAS_F77_H
1010#define CBLAS_F77_H
1111
12+ #include <stdint.h>
13+
1214#ifdef CRAY
1315 #include <fortran.h>
1416 #define F77_CHAR _fcd
1719 #define F77_STRLEN (a ) (_fcdlen)
1820#endif
1921
22+ #ifndef F77_INT
2023#ifdef WeirdNEC
21- #define F77_INT long
24+ #define F77_INT int64_t
25+ #else
26+ #define F77_INT int32_t
27+ #endif
2228#endif
2329
2430#ifdef F77_CHAR
Original file line number Diff line number Diff line change @@ -14,6 +14,19 @@ macro( CheckLAPACKCompilerFlags )
1414
1515set ( FPE_EXIT FALSE )
1616
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+
1730# GNU Fortran
1831if ( CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
1932 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)
5353 set (LAPACKELIB "lapacke64" )
5454 set (TMGLIB "tmglib64" )
5555 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 )
5757else ()
5858 set (BLASLIB "blas" )
5959 set (CBLASLIB "cblas" )
Original file line number Diff line number Diff line change @@ -49,12 +49,13 @@ extern "C" {
4949#endif /* __cplusplus */
5050
5151#include < stdlib.h>
52+ #include < stdint.h>
5253
5354#ifndef lapack_int
5455#if defined(LAPACK_ILP64)
55- #define lapack_int long
56+ #define lapack_int int64_t
5657#else
57- #define lapack_int int
58+ #define lapack_int int32_t
5859#endif
5960#endif
6061
You can’t perform that action at this time.
0 commit comments