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
@@ -15,10 +16,12 @@ extern "C" { /* Assume C declarations for C++ */
1516/*
1617 * Integer type
1718 */
19+ #ifndef CBLAS_INT
1820#ifdef WeirdNEC
19- #define CBLAS_INT long
21+ #define CBLAS_INT int64_t
2022#else
21- #define CBLAS_INT int
23+ #define CBLAS_INT int32_t
24+ #endif
2225#endif
2326
2427typedef enum CBLAS_LAYOUT {CblasRowMajor = 101 , CblasColMajor = 102 } CBLAS_LAYOUT ;
Original file line number Diff line number Diff line change 1010#define CBLAS_F77_H
1111
1212#include <stdarg.h>
13+ #include <stdint.h>
1314
1415/* It seems all current Fortran compilers put strlen at end.
1516* Some historical compilers put strlen after the str argument
2425 #define F77_STRLEN (a ) (_fcdlen)
2526#endif
2627
28+ #ifndef F77_INT
2729#ifdef WeirdNEC
28- #define F77_INT long
30+ #define F77_INT int64_t
2931#else
30- #define F77_INT int
32+ #define F77_INT int32_t
33+ #endif
3134#endif
3235
3336#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 @@ -41,12 +41,13 @@ extern "C" {
4141#endif /* __cplusplus */
4242
4343#include < stdlib.h>
44+ #include < stdint.h>
4445
4546#ifndef lapack_int
4647#if defined(LAPACK_ILP64)
47- #define lapack_int long
48+ #define lapack_int int64_t
4849#else
49- #define lapack_int int
50+ #define lapack_int int32_t
5051#endif
5152#endif
5253
You can’t perform that action at this time.
0 commit comments