Skip to content

Commit 9077255

Browse files
committed
Wrap all functions to macro for Index-64 API in LAPACKE
1 parent 741a2c2 commit 9077255

File tree

2,677 files changed

+22141
-22141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,677 files changed

+22141
-22141
lines changed

LAPACKE/include/lapacke_utils.h

Lines changed: 154 additions & 154 deletions
Large diffs are not rendered by default.

LAPACKE/src/lapacke_cbbcsd.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "lapacke_utils.h"
3434

35-
lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
35+
lapack_int API_SUFFIX(LAPACKE_cbbcsd)( int matrix_layout, char jobu1, char jobu2,
3636
char jobv1t, char jobv2t, char trans, lapack_int m,
3737
lapack_int p, lapack_int q, float* theta, float* phi,
3838
lapack_complex_float* u1, lapack_int ldu1,
@@ -48,47 +48,47 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
4848
float rwork_query;
4949
int lapack_layout;
5050
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
51-
LAPACKE_xerbla( "LAPACKE_cbbcsd", -1 );
51+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd", -1 );
5252
return -1;
5353
}
54-
if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
54+
if( API_SUFFIX(LAPACKE_lsame)( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
5555
lapack_layout = LAPACK_COL_MAJOR;
5656
} else {
5757
lapack_layout = LAPACK_ROW_MAJOR;
5858
}
5959
#ifndef LAPACK_DISABLE_NAN_CHECK
6060
if( LAPACKE_get_nancheck() ) {
6161
/* Optionally check input matrices for NaNs */
62-
if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
62+
if( API_SUFFIX(LAPACKE_s_nancheck)( q-1, phi, 1 ) ) {
6363
return -11;
6464
}
65-
if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
65+
if( API_SUFFIX(LAPACKE_s_nancheck)( q, theta, 1 ) ) {
6666
return -10;
6767
}
68-
if( LAPACKE_lsame( jobu1, 'y' ) ) {
69-
if( LAPACKE_cge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
68+
if( API_SUFFIX(LAPACKE_lsame)( jobu1, 'y' ) ) {
69+
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, p, p, u1, ldu1 ) ) {
7070
return -12;
7171
}
7272
}
73-
if( LAPACKE_lsame( jobu2, 'y' ) ) {
74-
if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
73+
if( API_SUFFIX(LAPACKE_lsame)( jobu2, 'y' ) ) {
74+
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
7575
return -14;
7676
}
7777
}
78-
if( LAPACKE_lsame( jobv1t, 'y' ) ) {
79-
if( LAPACKE_cge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
78+
if( API_SUFFIX(LAPACKE_lsame)( jobv1t, 'y' ) ) {
79+
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, q, q, v1t, ldv1t ) ) {
8080
return -16;
8181
}
8282
}
83-
if( LAPACKE_lsame( jobv2t, 'y' ) ) {
84-
if( LAPACKE_cge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
83+
if( API_SUFFIX(LAPACKE_lsame)( jobv2t, 'y' ) ) {
84+
if( API_SUFFIX(LAPACKE_cge_nancheck)( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
8585
return -18;
8686
}
8787
}
8888
}
8989
#endif
9090
/* Query optimal working array(s) size */
91-
info = LAPACKE_cbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
91+
info = API_SUFFIX(LAPACKE_cbbcsd_work)( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
9292
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
9393
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
9494
b21d, b21e, b22d, b22e, &rwork_query, lrwork );
@@ -103,15 +103,15 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
103103
goto exit_level_0;
104104
}
105105
/* Call middle-level interface */
106-
info = LAPACKE_cbbcsd_work( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
106+
info = API_SUFFIX(LAPACKE_cbbcsd_work)( matrix_layout, jobu1, jobu2, jobv1t, jobv2t,
107107
trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2,
108108
v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e,
109109
b21d, b21e, b22d, b22e, rwork, lrwork );
110110
/* Release memory and exit */
111111
LAPACKE_free( rwork );
112112
exit_level_0:
113113
if( info == LAPACK_WORK_MEMORY_ERROR ) {
114-
LAPACKE_xerbla( "LAPACKE_cbbcsd", info );
114+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd", info );
115115
}
116116
return info;
117117
}

LAPACKE/src/lapacke_cbbcsd_work.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "lapacke_utils.h"
3434

35-
lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
35+
lapack_int API_SUFFIX(LAPACKE_cbbcsd_work)( int matrix_layout, char jobu1, char jobu2,
3636
char jobv1t, char jobv2t, char trans,
3737
lapack_int m, lapack_int p, lapack_int q,
3838
float* theta, float* phi,
@@ -63,7 +63,7 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
6363
if( matrix_layout == LAPACK_COL_MAJOR ||
6464
matrix_layout == LAPACK_ROW_MAJOR ) {
6565
char ltrans;
66-
if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
66+
if( !API_SUFFIX(LAPACKE_lsame)( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
6767
ltrans = 'n';
6868
} else {
6969
ltrans = 't';
@@ -78,7 +78,7 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
7878
}
7979
} else {
8080
info = -1;
81-
LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
81+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbbcsd_work", info );
8282
}
8383
return info;
8484
}

LAPACKE/src/lapacke_cbdsqr.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "lapacke_utils.h"
3434

35-
lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
35+
lapack_int API_SUFFIX(LAPACKE_cbdsqr)( int matrix_layout, char uplo, lapack_int n,
3636
lapack_int ncvt, lapack_int nru, lapack_int ncc,
3737
float* d, float* e, lapack_complex_float* vt,
3838
lapack_int ldvt, lapack_complex_float* u,
@@ -42,30 +42,30 @@ lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
4242
lapack_int info = 0;
4343
float* work = NULL;
4444
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
45-
LAPACKE_xerbla( "LAPACKE_cbdsqr", -1 );
45+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr", -1 );
4646
return -1;
4747
}
4848
#ifndef LAPACK_DISABLE_NAN_CHECK
4949
if( LAPACKE_get_nancheck() ) {
5050
/* Optionally check input matrices for NaNs */
5151
if( ncc != 0 ) {
52-
if( LAPACKE_cge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
52+
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, ncc, c, ldc ) ) {
5353
return -13;
5454
}
5555
}
56-
if( LAPACKE_s_nancheck( n, d, 1 ) ) {
56+
if( API_SUFFIX(LAPACKE_s_nancheck)( n, d, 1 ) ) {
5757
return -7;
5858
}
59-
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
59+
if( API_SUFFIX(LAPACKE_s_nancheck)( n-1, e, 1 ) ) {
6060
return -8;
6161
}
6262
if( nru != 0 ) {
63-
if( LAPACKE_cge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
63+
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, nru, n, u, ldu ) ) {
6464
return -11;
6565
}
6666
}
6767
if( ncvt != 0 ) {
68-
if( LAPACKE_cge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
68+
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, ncvt, vt, ldvt ) ) {
6969
return -9;
7070
}
7171
}
@@ -78,13 +78,13 @@ lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
7878
goto exit_level_0;
7979
}
8080
/* Call middle-level interface */
81-
info = LAPACKE_cbdsqr_work( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
81+
info = API_SUFFIX(LAPACKE_cbdsqr_work)( matrix_layout, uplo, n, ncvt, nru, ncc, d, e, vt,
8282
ldvt, u, ldu, c, ldc, work );
8383
/* Release memory and exit */
8484
LAPACKE_free( work );
8585
exit_level_0:
8686
if( info == LAPACK_WORK_MEMORY_ERROR ) {
87-
LAPACKE_xerbla( "LAPACKE_cbdsqr", info );
87+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr", info );
8888
}
8989
return info;
9090
}

LAPACKE/src/lapacke_cbdsqr_work.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "lapacke_utils.h"
3434

35-
lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
35+
lapack_int API_SUFFIX(LAPACKE_cbdsqr_work)( int matrix_layout, char uplo, lapack_int n,
3636
lapack_int ncvt, lapack_int nru, lapack_int ncc,
3737
float* d, float* e, lapack_complex_float* vt,
3838
lapack_int ldvt, lapack_complex_float* u,
@@ -57,17 +57,17 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
5757
/* Check leading dimension(s) */
5858
if( ldc < ncc ) {
5959
info = -14;
60-
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
60+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
6161
return info;
6262
}
6363
if( ldu < n ) {
6464
info = -12;
65-
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
65+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
6666
return info;
6767
}
6868
if( ldvt < ncvt ) {
6969
info = -10;
70-
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
70+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
7171
return info;
7272
}
7373
/* Allocate memory for temporary array(s) */
@@ -100,13 +100,13 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
100100
}
101101
/* Transpose input matrices */
102102
if( ncvt != 0 ) {
103-
LAPACKE_cge_trans( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
103+
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, ncvt, vt, ldvt, vt_t, ldvt_t );
104104
}
105105
if( nru != 0 ) {
106-
LAPACKE_cge_trans( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
106+
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, nru, n, u, ldu, u_t, ldu_t );
107107
}
108108
if( ncc != 0 ) {
109-
LAPACKE_cge_trans( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
109+
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, n, ncc, c, ldc, c_t, ldc_t );
110110
}
111111
/* Call LAPACK function and adjust info */
112112
LAPACK_cbdsqr( &uplo, &n, &ncvt, &nru, &ncc, d, e, vt_t, &ldvt_t, u_t,
@@ -116,14 +116,14 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
116116
}
117117
/* Transpose output matrices */
118118
if( ncvt != 0 ) {
119-
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
119+
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, ncvt, vt_t, ldvt_t, vt,
120120
ldvt );
121121
}
122122
if( nru != 0 ) {
123-
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
123+
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, nru, n, u_t, ldu_t, u, ldu );
124124
}
125125
if( ncc != 0 ) {
126-
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
126+
API_SUFFIX(LAPACKE_cge_trans)( LAPACK_COL_MAJOR, n, ncc, c_t, ldc_t, c, ldc );
127127
}
128128
/* Release memory and exit */
129129
if( ncc != 0 ) {
@@ -139,11 +139,11 @@ lapack_int LAPACKE_cbdsqr_work( int matrix_layout, char uplo, lapack_int n,
139139
}
140140
exit_level_0:
141141
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
142-
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
142+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
143143
}
144144
} else {
145145
info = -1;
146-
LAPACKE_xerbla( "LAPACKE_cbdsqr_work", info );
146+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cbdsqr_work", info );
147147
}
148148
return info;
149149
}

LAPACKE/src/lapacke_cgbbrd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "lapacke_utils.h"
3434

35-
lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
35+
lapack_int API_SUFFIX(LAPACKE_cgbbrd)( int matrix_layout, char vect, lapack_int m,
3636
lapack_int n, lapack_int ncc, lapack_int kl,
3737
lapack_int ku, lapack_complex_float* ab,
3838
lapack_int ldab, float* d, float* e,
@@ -44,17 +44,17 @@ lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
4444
float* rwork = NULL;
4545
lapack_complex_float* work = NULL;
4646
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
47-
LAPACKE_xerbla( "LAPACKE_cgbbrd", -1 );
47+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd", -1 );
4848
return -1;
4949
}
5050
#ifndef LAPACK_DISABLE_NAN_CHECK
5151
if( LAPACKE_get_nancheck() ) {
5252
/* Optionally check input matrices for NaNs */
53-
if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
53+
if( API_SUFFIX(LAPACKE_cgb_nancheck)( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
5454
return -8;
5555
}
5656
if( ncc != 0 ) {
57-
if( LAPACKE_cge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
57+
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, ncc, c, ldc ) ) {
5858
return -16;
5959
}
6060
}
@@ -73,15 +73,15 @@ lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
7373
goto exit_level_1;
7474
}
7575
/* Call middle-level interface */
76-
info = LAPACKE_cgbbrd_work( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
76+
info = API_SUFFIX(LAPACKE_cgbbrd_work)( matrix_layout, vect, m, n, ncc, kl, ku, ab, ldab,
7777
d, e, q, ldq, pt, ldpt, c, ldc, work, rwork );
7878
/* Release memory and exit */
7979
LAPACKE_free( work );
8080
exit_level_1:
8181
LAPACKE_free( rwork );
8282
exit_level_0:
8383
if( info == LAPACK_WORK_MEMORY_ERROR ) {
84-
LAPACKE_xerbla( "LAPACKE_cgbbrd", info );
84+
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgbbrd", info );
8585
}
8686
return info;
8787
}

0 commit comments

Comments
 (0)