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). */
@@ -2503,7 +2513,7 @@ void LAPACK_zgesvdq(
2503
2513
lapack_complex_double* U, lapack_int const * ldu,
2504
2514
lapack_complex_double* V, lapack_int const * ldv, lapack_int* numrank,
2505
2515
lapack_int* iwork, lapack_int const * liwork,
2506
- lapack_complex_float * cwork, lapack_int* lcwork,
2516
+ lapack_complex_double * cwork, lapack_int* lcwork,
2507
2517
double * rwork, lapack_int const * lrwork,
2508
2518
lapack_int* info );
2509
2519
@@ -3640,45 +3650,58 @@ 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,
3645
- 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 );
3653
+ lapack_int LAPACK_sggsvd(
3654
+ char const * jobu, char const * jobv, char const * jobq,
3655
+ lapack_int const * m, lapack_int const * n, lapack_int const * p,
3656
+ lapack_int* k, lapack_int* l,
3657
+ float * a, lapack_int const * lda,
3658
+ float * b, lapack_int const * ldb,
3659
+ float * alpha, float * beta,
3660
+ float * u, lapack_int const * ldu,
3661
+ float * v, lapack_int const * ldv,
3662
+ float * q, lapack_int const * ldq,
3663
+ float * work, lapack_int* iwork, lapack_int* info );
3650
3664
3651
3665
#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,
3654
- lapack_int* k, lapack_int* l, double * a,
3655
- lapack_int lda, double * b, lapack_int ldb,
3656
- double * alpha, double * beta, double * u,
3657
- lapack_int ldu, double * v, lapack_int ldv, double * q,
3658
- lapack_int ldq, lapack_int* iwork );
3666
+ lapack_int LAPACK_dggsvd(
3667
+ char const * jobu, char const * jobv, char const * jobq,
3668
+ lapack_int const * m, lapack_int const * n, lapack_int const * p,
3669
+ lapack_int* k, lapack_int* l,
3670
+ double * a, lapack_int const * lda,
3671
+ double * b, lapack_int const * ldb,
3672
+ double * alpha, double * beta,
3673
+ double * u, lapack_int const * ldu,
3674
+ double * v, lapack_int const * ldv,
3675
+ double * q, lapack_int const * ldq,
3676
+ double * work, lapack_int* iwork, lapack_int* info );
3659
3677
3660
3678
#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,
3663
- lapack_int* k, lapack_int* l,
3664
- lapack_complex_float* a, lapack_int lda,
3665
- lapack_complex_float* b, lapack_int ldb,
3666
- 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 );
3679
+ lapack_int LAPACK_cggsvd(
3680
+ char const * jobu, char const * jobv, char const * jobq,
3681
+ lapack_int const * m, lapack_int const * n, lapack_int const * p,
3682
+ lapack_int* k, lapack_int* l,
3683
+ lapack_complex_float* a, lapack_int const * lda,
3684
+ lapack_complex_float* b, lapack_int const * ldb,
3685
+ float * alpha, float * beta,
3686
+ lapack_complex_float* u, lapack_int const * ldu,
3687
+ lapack_complex_float* v, lapack_int const * ldv,
3688
+ lapack_complex_float* q, lapack_int const * ldq,
3689
+ lapack_complex_float* work, float * rwork,
3690
+ lapack_int* iwork, lapack_int* info );
3670
3691
3671
3692
#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,
3674
- lapack_int* k, lapack_int* l,
3675
- lapack_complex_double* a, lapack_int lda,
3676
- lapack_complex_double* b, lapack_int ldb,
3677
- 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 );
3693
+ lapack_int LAPACK_zggsvd(
3694
+ char const * jobu, char const * jobv, char const * jobq,
3695
+ lapack_int const * m, lapack_int const * n, lapack_int const * p,
3696
+ lapack_int* k, lapack_int* l,
3697
+ lapack_complex_double* a, lapack_int const * lda,
3698
+ lapack_complex_double* b, lapack_int const * ldb,
3699
+ double * alpha, double * beta,
3700
+ lapack_complex_double* u, lapack_int const * ldu,
3701
+ lapack_complex_double* v, lapack_int const * ldv,
3702
+ lapack_complex_double* q, lapack_int const * ldq,
3703
+ lapack_complex_double* work, double * rwork,
3704
+ lapack_int* iwork, lapack_int* info );
3682
3705
3683
3706
#define LAPACK_cggsvd3 LAPACK_GLOBAL (cggsvd3,CGGSVD3)
3684
3707
void LAPACK_cggsvd3(
@@ -3743,41 +3766,58 @@ void LAPACK_zggsvd3(
3743
3766
lapack_int* info );
3744
3767
3745
3768
#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 );
3769
+ lapack_int LAPACK_sggsvp(
3770
+ char const * jobu, char const * jobv, char const * jobq,
3771
+ lapack_int const * m, lapack_int const * p, lapack_int const * n,
3772
+ float * a, lapack_int const * lda,
3773
+ float * b, lapack_int const * ldb,
3774
+ float * tola, float * tolb,
3775
+ lapack_int* k, lapack_int* l,
3776
+ float * u, lapack_int const * ldu,
3777
+ float * v, lapack_int const * ldv,
3778
+ float * q, lapack_int const * ldq,
3779
+ lapack_int* iwork, float * tau,
3780
+ float * work, lapack_int* info );
3752
3781
3753
3782
#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 );
3783
+ lapack_int LAPACK_dggsvp(
3784
+ char const * jobu, char const * jobv, char const * jobq,
3785
+ lapack_int const * m, lapack_int const * p, lapack_int const * n,
3786
+ double * a, lapack_int const * lda,
3787
+ double * b, lapack_int const * ldb,
3788
+ double * tola, double * tolb,
3789
+ lapack_int* k, lapack_int* l,
3790
+ double * u, lapack_int const * ldu,
3791
+ double * v, lapack_int const * ldv,
3792
+ double * q, lapack_int const * ldq,
3793
+ lapack_int* iwork, double * tau,
3794
+ double * work, lapack_int* info );
3760
3795
3761
3796
#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 );
3797
+ lapack_int LAPACK_cggsvp(
3798
+ char const * jobu, char const * jobv, char const * jobq,
3799
+ lapack_int const * m, lapack_int const * p, lapack_int const * n,
3800
+ lapack_complex_float* a, lapack_int const * lda,
3801
+ lapack_complex_float* b, lapack_int const * ldb,
3802
+ float * tola, float * tolb, lapack_int* k, lapack_int* l,
3803
+ lapack_complex_float* u, lapack_int const * ldu,
3804
+ lapack_complex_float* v, lapack_int const * ldv,
3805
+ lapack_complex_float* q, lapack_int const * ldq,
3806
+ lapack_int* iwork, float * rwork, lapack_complex_float* tau,
3807
+ lapack_complex_float* work, lapack_int* info );
3770
3808
3771
3809
#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,
3777
- 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 );
3810
+ lapack_int LAPACK_zggsvp(
3811
+ char const * jobu, char const * jobv, char const * jobq,
3812
+ lapack_int const * m, lapack_int const * p, lapack_int const * n,
3813
+ lapack_complex_double* a, lapack_int const * lda,
3814
+ lapack_complex_double* b, lapack_int const * ldb,
3815
+ double * tola, double * tolb, lapack_int* k, lapack_int* l,
3816
+ lapack_complex_double* u, lapack_int const * ldu,
3817
+ lapack_complex_double* v, lapack_int const * ldv,
3818
+ lapack_complex_double* q, lapack_int const * ldq,
3819
+ lapack_int* iwork, double * rwork, lapack_complex_double* tau,
3820
+ lapack_complex_double* work, lapack_int* info );
3781
3821
3782
3822
#define LAPACK_cggsvp3 LAPACK_GLOBAL (cggsvp3,CGGSVP3)
3783
3823
void LAPACK_cggsvp3(
0 commit comments