Skip to content

Commit 0b5b0fa

Browse files
committed
Added 64-bit integer switch to lapack.h header
1 parent 5725996 commit 0b5b0fa

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

LAPACKE/include/lapack.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,26 @@ extern "C" {
8181

8282
/*----------------------------------------------------------------------------*/
8383
#ifndef lapack_int
84-
#define lapack_int int32_t
84+
#if defined(LAPACK_ILP64)
85+
#define lapack_int int64_t
86+
#else
87+
#define lapack_int int32_t
88+
#endif
8589
#endif
8690

91+
/*
92+
* Integer format string
93+
*/
8794
#ifndef LAPACK_IFMT
88-
#define LAPACK_IFMT PRId32
95+
#if defined(LAPACK_ILP64)
96+
#define LAPACK_IFMT PRId64
97+
#else
98+
#define LAPACK_IFMT PRId32
99+
#endif
89100
#endif
90101

91102
#ifndef lapack_logical
92-
#define lapack_logical lapack_int
103+
#define lapack_logical lapack_int
93104
#endif
94105

95106
/* f2c, hence clapack and MacOS Accelerate, returns double instead of float

LAPACKE/include/lapacke_config.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ extern "C" {
4646

4747
#ifndef lapack_int
4848
#if defined(LAPACK_ILP64)
49-
#define lapack_int int64_t
49+
#define lapack_int int64_t
5050
#else
51-
#define lapack_int int32_t
51+
#define lapack_int int32_t
5252
#endif
5353
#endif
5454

@@ -57,14 +57,14 @@ extern "C" {
5757
*/
5858
#ifndef LAPACK_IFMT
5959
#if defined(LAPACK_ILP64)
60-
#define LAPACK_IFMT PRId64
60+
#define LAPACK_IFMT PRId64
6161
#else
62-
#define LAPACK_IFMT PRId32
62+
#define LAPACK_IFMT PRId32
6363
#endif
6464
#endif
6565

6666
#ifndef lapack_logical
67-
#define lapack_logical lapack_int
67+
#define lapack_logical lapack_int
6868
#endif
6969

7070
#ifndef LAPACK_COMPLEX_CUSTOM

0 commit comments

Comments
 (0)