12
12
13
13
#include < stdlib.h>
14
14
15
- #ifdef __cplusplus
16
- extern " C" {
17
- #endif
18
-
19
- /* ----------------------------------------------------------------------------*/
20
- #ifndef lapack_int
21
- #define lapack_int int
22
- #endif
23
-
24
- #ifndef lapack_logical
25
- #define lapack_logical lapack_int
26
- #endif
27
-
28
- /* f2c, hence clapack and MacOS Accelerate, returns double instead of float
29
- * for sdot, slange, clange, etc. */
30
- #if defined(LAPACK_F2C)
31
- typedef double lapack_float_return;
32
- #else
33
- typedef float lapack_float_return;
34
- #endif
35
-
36
15
/* Complex types are structures equivalent to the
37
16
* Fortran complex types COMPLEX(4) and COMPLEX(8).
38
17
*
@@ -52,7 +31,11 @@ extern "C" {
52
31
53
32
/* Complex type (single precision) */
54
33
#ifndef lapack_complex_float
34
+ #ifndef __cplusplus
55
35
#include < complex.h>
36
+ #else
37
+ #include < complex>
38
+ #endif
56
39
#define lapack_complex_float float _Complex
57
40
#endif
58
41
@@ -66,7 +49,11 @@ extern "C" {
66
49
67
50
/* Complex type (double precision) */
68
51
#ifndef lapack_complex_double
52
+ #ifndef __cplusplus
69
53
#include < complex.h>
54
+ #else
55
+ #include < complex>
56
+ #endif
70
57
#define lapack_complex_double double _Complex
71
58
#endif
72
59
@@ -80,6 +67,29 @@ extern "C" {
80
67
81
68
#endif /* LAPACK_COMPLEX_CUSTOM */
82
69
70
+
71
+ #ifdef __cplusplus
72
+ extern " C" {
73
+ #endif
74
+
75
+ /* ----------------------------------------------------------------------------*/
76
+ #ifndef lapack_int
77
+ #define lapack_int int
78
+ #endif
79
+
80
+ #ifndef lapack_logical
81
+ #define lapack_logical lapack_int
82
+ #endif
83
+
84
+ /* f2c, hence clapack and MacOS Accelerate, returns double instead of float
85
+ * for sdot, slange, clange, etc. */
86
+ #if defined(LAPACK_F2C)
87
+ typedef double lapack_float_return;
88
+ #else
89
+ typedef float lapack_float_return;
90
+ #endif
91
+
92
+
83
93
/* Callback logical functions of one, two, or three arguments are used
84
94
* to select eigenvalues to sort to the top left of the Schur form.
85
95
* The value is selected if function returns TRUE (non-zero). */
@@ -3640,45 +3650,45 @@ void LAPACK_zggrqf(
3640
3650
lapack_int* info );
3641
3651
3642
3652
#define LAPACK_sggsvd LAPACK_GLOBAL (sggsvd,SGGSVD)
3643
- lapack_int LAPACKE_sggsvd( int matrix_layout, char jobu, char jobv, char jobq,
3644
- lapack_int m, lapack_int n, lapack_int p,
3653
+ lapack_int LAPACK_sggsvd( char const * jobu, char const * jobv, char const * jobq,
3654
+ lapack_int* m, lapack_int* n, lapack_int* p,
3645
3655
lapack_int* k, lapack_int* l, float * a,
3646
- lapack_int lda, float * b, lapack_int ldb,
3647
- float * alpha, float * beta, float * u, lapack_int ldu,
3648
- float * v, lapack_int ldv, float * q, lapack_int ldq,
3649
- lapack_int* iwork );
3656
+ lapack_int* lda, float * b, lapack_int* ldb,
3657
+ float * alpha, float * beta, float * u, lapack_int* ldu,
3658
+ float * v, lapack_int* ldv, float * q, lapack_int* ldq,
3659
+ float * work, lapack_int* iwork, lapack_int* info );
3650
3660
3651
3661
#define LAPACK_dggsvd LAPACK_GLOBAL (dggsvd,DGGSVD)
3652
- lapack_int LAPACKE_dggsvd( int matrix_layout, char jobu, char jobv, char jobq,
3653
- lapack_int m, lapack_int n, lapack_int p,
3662
+ lapack_int LAPACK_dggsvd( char const * jobu, char const * jobv, char const * jobq,
3663
+ lapack_int* m, lapack_int* n, lapack_int* p,
3654
3664
lapack_int* k, lapack_int* l, double * a,
3655
- lapack_int lda, double * b, lapack_int ldb,
3665
+ lapack_int* lda, double * b, lapack_int* ldb,
3656
3666
double * alpha, double * beta, double * u,
3657
- lapack_int ldu, double * v, lapack_int ldv, double * q,
3658
- lapack_int ldq, lapack_int* iwork );
3667
+ lapack_int* ldu, double * v, lapack_int* ldv, double * q,
3668
+ lapack_int* ldq, float * work, lapack_int* iwork, lapack_int* info );
3659
3669
3660
3670
#define LAPACK_cggsvd LAPACK_GLOBAL (cggsvd,CGGSVD)
3661
- lapack_int LAPACKE_cggsvd( int matrix_layout, char jobu, char jobv, char jobq,
3662
- lapack_int m, lapack_int n, lapack_int p,
3671
+ lapack_int LAPACK_cggsvd( char const * jobu, char const * jobv, char const * jobq,
3672
+ lapack_int* m, lapack_int* n, lapack_int* p,
3663
3673
lapack_int* k, lapack_int* l,
3664
- lapack_complex_float* a, lapack_int lda,
3665
- lapack_complex_float* b, lapack_int ldb,
3674
+ lapack_complex_float* a, lapack_int* lda,
3675
+ lapack_complex_float* b, lapack_int* ldb,
3666
3676
float * alpha, float * beta, lapack_complex_float* u,
3667
- lapack_int ldu, lapack_complex_float* v,
3668
- lapack_int ldv, lapack_complex_float* q,
3669
- lapack_int ldq, lapack_int* iwork );
3677
+ lapack_int* ldu, lapack_complex_float* v,
3678
+ lapack_int* ldv, lapack_complex_float* q,
3679
+ lapack_int* ldq, float * work, lapack_int* rwork, lapack_int* iwork, lapack_int *info );
3670
3680
3671
3681
#define LAPACK_zggsvd LAPACK_GLOBAL (zggsvd,ZGGSVD)
3672
- lapack_int LAPACKE_zggsvd( int matrix_layout, char jobu, char jobv, char jobq,
3673
- lapack_int m, lapack_int n, lapack_int p,
3682
+ lapack_int LAPACK_zggsvd( char const * jobu, char const * jobv, char const * jobq,
3683
+ lapack_int* m, lapack_int* n, lapack_int* p,
3674
3684
lapack_int* k, lapack_int* l,
3675
- lapack_complex_double* a, lapack_int lda,
3676
- lapack_complex_double* b, lapack_int ldb,
3685
+ lapack_complex_double* a, lapack_int* lda,
3686
+ lapack_complex_double* b, lapack_int* ldb,
3677
3687
double * alpha, double * beta,
3678
- lapack_complex_double* u, lapack_int ldu,
3679
- lapack_complex_double* v, lapack_int ldv,
3680
- lapack_complex_double* q, lapack_int ldq,
3681
- lapack_int* iwork );
3688
+ lapack_complex_double* u, lapack_int* ldu,
3689
+ lapack_complex_double* v, lapack_int* ldv,
3690
+ lapack_complex_double* q, lapack_int* ldq,
3691
+ float * work, lapack_int* rwork, lapack_int* iwork, lapack_int* info );
3682
3692
3683
3693
#define LAPACK_cggsvd3 LAPACK_GLOBAL (cggsvd3,CGGSVD3)
3684
3694
void LAPACK_cggsvd3(
@@ -3743,41 +3753,49 @@ void LAPACK_zggsvd3(
3743
3753
lapack_int* info );
3744
3754
3745
3755
#define LAPACK_sggsvp LAPACK_GLOBAL (sggsvp,SGGSVP)
3746
- lapack_int LAPACKE_sggsvp( int matrix_layout, char jobu, char jobv, char jobq,
3747
- lapack_int m, lapack_int p, lapack_int n, float * a,
3748
- lapack_int lda, float * b, lapack_int ldb, float tola,
3749
- float tolb, lapack_int* k, lapack_int* l, float * u,
3750
- lapack_int ldu, float * v, lapack_int ldv, float * q,
3751
- lapack_int ldq );
3756
+ lapack_int LAPACK_sggsvp( char const * jobu, char const * jobv, char const * jobq,
3757
+ lapack_int* m, lapack_int* p, lapack_int* n, float * a,
3758
+ lapack_int* lda, float * b, lapack_int* ldb, float * tola,
3759
+ float * tolb, lapack_int* k, lapack_int* l, float * u,
3760
+ lapack_int* ldu, float * v, lapack_int* ldv, float * q,
3761
+ lapack_int* ldq, lapack_int* iwork, float * tau,
3762
+ float * work, lapack_int* info);
3752
3763
3753
3764
#define LAPACK_dggsvp LAPACK_GLOBAL (dggsvp,DGGSVP)
3754
- lapack_int LAPACKE_dggsvp( int matrix_layout, char jobu, char jobv, char jobq,
3755
- lapack_int m, lapack_int p, lapack_int n, double * a,
3756
- lapack_int lda, double * b, lapack_int ldb,
3757
- double tola, double tolb, lapack_int* k,
3758
- lapack_int* l, double * u, lapack_int ldu, double * v,
3759
- lapack_int ldv, double * q, lapack_int ldq );
3765
+ lapack_int LAPACK_dggsvp( char const * jobu, char const * jobv, char const * jobq,
3766
+ lapack_int* m, lapack_int* p, lapack_int* n, double * a,
3767
+ lapack_int* lda, double * b, lapack_int* ldb,
3768
+ double * tola, double * tolb, lapack_int* k,
3769
+ lapack_int* l, double * u, lapack_int* ldu, double * v,
3770
+ lapack_int* ldv, double * q, lapack_int* ldq,
3771
+ lapack_int* iwork, double * tau, double * work,
3772
+ lapack_int* info);
3760
3773
3761
3774
#define LAPACK_cggsvp LAPACK_GLOBAL (cggsvp,CGGSVP)
3762
- lapack_int LAPACKE_cggsvp( int matrix_layout, char jobu, char jobv, char jobq,
3763
- lapack_int m, lapack_int p, lapack_int n,
3764
- lapack_complex_float* a, lapack_int lda,
3765
- lapack_complex_float* b, lapack_int ldb, float tola,
3766
- float tolb, lapack_int* k, lapack_int* l,
3767
- lapack_complex_float* u, lapack_int ldu,
3768
- lapack_complex_float* v, lapack_int ldv,
3769
- lapack_complex_float* q, lapack_int ldq );
3775
+ lapack_int LAPACK_cggsvp( char const * jobu, char const * jobv, char const * jobq,
3776
+ lapack_int* m, lapack_int* p, lapack_int* n,
3777
+ lapack_complex_float* a, lapack_int* lda,
3778
+ lapack_complex_float* b, lapack_int* ldb, float * tola,
3779
+ float * tolb, lapack_int* k, lapack_int* l,
3780
+ lapack_complex_float* u, lapack_int* ldu,
3781
+ lapack_complex_float* v, lapack_int* ldv,
3782
+ lapack_complex_float* q, lapack_int* ldq,
3783
+ lapack_int* iwork, lapack_int* rwork,
3784
+ lapack_complex_float* tau, lapack_complex_float* work,
3785
+ lapack_int* info);
3770
3786
3771
3787
#define LAPACK_zggsvp LAPACK_GLOBAL (zggsvp,ZGGSVP)
3772
- lapack_int LAPACKE_zggsvp( int matrix_layout, char jobu, char jobv, char jobq,
3773
- lapack_int m, lapack_int p, lapack_int n,
3774
- lapack_complex_double* a, lapack_int lda,
3775
- lapack_complex_double* b, lapack_int ldb,
3776
- double tola, double tolb, lapack_int* k,
3788
+ lapack_int LAPACK_zggsvp( char const * jobu, char const * jobv, char const * jobq,
3789
+ lapack_int* m, lapack_int* p, lapack_int* n,
3790
+ lapack_complex_double* a, lapack_int* lda,
3791
+ lapack_complex_double* b, lapack_int* ldb,
3792
+ double * tola, double * tolb, lapack_int* k,
3777
3793
lapack_int* l, lapack_complex_double* u,
3778
- lapack_int ldu, lapack_complex_double* v,
3779
- lapack_int ldv, lapack_complex_double* q,
3780
- lapack_int ldq );
3794
+ lapack_int* ldu, lapack_complex_double* v,
3795
+ lapack_int* ldv, lapack_complex_double* q,
3796
+ lapack_int* ldq, lapack_int* iwork, lapack_int* rwork,
3797
+ lapack_complex_double* tau, lapack_complex_double* work,
3798
+ lapack_int* info);
3781
3799
3782
3800
#define LAPACK_cggsvp3 LAPACK_GLOBAL (cggsvp3,CGGSVP3)
3783
3801
void LAPACK_cggsvp3(
0 commit comments