LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_zbbcsd_work()

lapack_int LAPACKE_zbbcsd_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,
lapack_complex_double u1,
lapack_int  ldu1,
lapack_complex_double u2,
lapack_int  ldu2,
lapack_complex_double v1t,
lapack_int  ldv1t,
lapack_complex_double v2t,
lapack_int  ldv2t,
double *  b11d,
double *  b11e,
double *  b12d,
double *  b12e,
double *  b21d,
double *  b21e,
double *  b22d,
double *  b22e,
double *  rwork,
lapack_int  lrwork 
)

Definition at line 36 of file lapacke_zbbcsd_work.c.

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