LAPACK  3.7.1
LAPACK: Linear Algebra PACKage

◆ LAPACKE_dbbcsd_work()

lapack_int LAPACKE_dbbcsd_work ( int  matrix_layout,
char  jobu1,
char  jobu2,
char  jobv1t,
char  jobv2t,
char  trans,
lapack_int  m,
lapack_int  p,
lapack_int  q,
double *  theta,
double *  phi,
double *  u1,
lapack_int  ldu1,
double *  u2,
lapack_int  ldu2,
double *  v1t,
lapack_int  ldv1t,
double *  v2t,
lapack_int  ldv2t,
double *  b11d,
double *  b11e,
double *  b12d,
double *  b12e,
double *  b21d,
double *  b21e,
double *  b22d,
double *  b22e,
double *  work,
lapack_int  lwork 
)

Definition at line 36 of file lapacke_dbbcsd_work.c.

46 {
47  lapack_int info = 0;
48  /* LAPACK function works with matrices in both layouts. It is supported
49  * through TRANS parameter. So all conversion between layouts can be
50  * completed in LAPACK function. See the table below which describes how
51  * every LAPACKE call is forwarded to corresponding LAPACK call.
52  *
53  * matrix_layout | trans_LAPACKE | -> trans_LAPACK
54  * | (trans) | (ltrans)
55  * -----------------+---------------+----------------
56  * LAPACK_COL_MAJOR | 'N' | -> 'N'
57  * LAPACK_COL_MAJOR | 'T' | -> 'T'
58  * LAPACK_ROW_MAJOR | 'N' | -> 'T'
59  * LAPACK_ROW_MAJOR | 'T' | -> 'T'
60  * (note that for row major layout trans parameter is ignored)
61  */
62  if( matrix_layout == LAPACK_COL_MAJOR ||
63  matrix_layout == LAPACK_ROW_MAJOR ) {
64  char ltrans;
65  if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
66  ltrans = 'n';
67  } else {
68  ltrans = 't';
69  }
70  /* Call LAPACK function and adjust info */
71  LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &m, &p, &q,
72  theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
73  &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e,
74  work, &lwork, &info );
75  if( info < 0 ) {
76  info = info - 1;
77  }
78  } else {
79  info = -1;
80  LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
81  }
82  return info;
83 }
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:36
#define LAPACK_COL_MAJOR
Definition: lapacke.h:120
void LAPACKE_xerbla(const char *name, lapack_int info)
#define lapack_int
Definition: lapacke.h:47
void LAPACK_dbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, lapack_int *m, lapack_int *p, lapack_int *q, double *theta, double *phi, double *u1, lapack_int *ldu1, double *u2, lapack_int *ldu2, double *v1t, lapack_int *ldv1t, double *v2t, lapack_int *ldv2t, double *b11d, double *b11e, double *b12d, double *b12e, double *b21d, double *b21e, double *b22d, double *b22e, double *work, lapack_int *lwork, lapack_int *info)
Here is the call graph for this function:
Here is the caller graph for this function: