LAPACK 3.11.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ LAPACKE_dggsvd3()

lapack_int LAPACKE_dggsvd3 ( int  matrix_layout,
char  jobu,
char  jobv,
char  jobq,
lapack_int  m,
lapack_int  n,
lapack_int  p,
lapack_int k,
lapack_int l,
double *  a,
lapack_int  lda,
double *  b,
lapack_int  ldb,
double *  alpha,
double *  beta,
double *  u,
lapack_int  ldu,
double *  v,
lapack_int  ldv,
double *  q,
lapack_int  ldq,
lapack_int iwork 
)

Definition at line 35 of file lapacke_dggsvd3.c.

42{
43 lapack_int info = 0;
44 double* work = NULL;
45 lapack_int lwork = -1;
46 double work_query;
47 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
48 LAPACKE_xerbla( "LAPACKE_dggsvd3", -1 );
49 return -1;
50 }
51#ifndef LAPACK_DISABLE_NAN_CHECK
52 if( LAPACKE_get_nancheck() ) {
53 /* Optionally check input matrices for NaNs */
54 if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
55 return -10;
56 }
57 if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
58 return -12;
59 }
60 }
61#endif
62 info = LAPACKE_dggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
63 a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
64 ldq, &work_query, lwork, iwork );
65 if( info != 0 )
66 goto exit_level_0;
67 lwork = work_query;
68 /* Allocate memory for working array(s) */
69 work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
70 if( work == NULL ) {
72 goto exit_level_0;
73 }
74 /* Call middle-level interface */
75 info = LAPACKE_dggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
76 a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
77 ldq, work, lwork, iwork );
78 /* Release memory and exit */
79 LAPACKE_free( work );
80exit_level_0:
81 if( info == LAPACK_WORK_MEMORY_ERROR ) {
82 LAPACKE_xerbla( "LAPACKE_dggsvd3", info );
83 }
84 return info;
85}
#define lapack_int
Definition: lapack.h:87
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:55
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACKE_free(p)
Definition: lapacke.h:46
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
lapack_int LAPACKE_dggsvd3_work(int matrix_layout, char jobu, char jobv, char jobq, lapack_int m, lapack_int n, lapack_int p, lapack_int *k, lapack_int *l, double *a, lapack_int lda, double *b, lapack_int ldb, double *alpha, double *beta, double *u, lapack_int ldu, double *v, lapack_int ldv, double *q, lapack_int ldq, double *work, lapack_int lwork, lapack_int *iwork)
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition: lapacke.h:43
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_dge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const double *a, lapack_int lda)
Here is the call graph for this function: