LAPACK  3.10.1
LAPACK: Linear Algebra PACKage

◆ LAPACKE_cuncsd_work()

lapack_int LAPACKE_cuncsd_work ( int  matrix_layout,
char  jobu1,
char  jobu2,
char  jobv1t,
char  jobv2t,
char  trans,
char  signs,
lapack_int  m,
lapack_int  p,
lapack_int  q,
lapack_complex_float x11,
lapack_int  ldx11,
lapack_complex_float x12,
lapack_int  ldx12,
lapack_complex_float x21,
lapack_int  ldx21,
lapack_complex_float x22,
lapack_int  ldx22,
float *  theta,
lapack_complex_float u1,
lapack_int  ldu1,
lapack_complex_float u2,
lapack_int  ldu2,
lapack_complex_float v1t,
lapack_int  ldv1t,
lapack_complex_float v2t,
lapack_int  ldv2t,
lapack_complex_float work,
lapack_int  lwork,
float *  rwork,
lapack_int  lrwork,
lapack_int iwork 
)

Definition at line 35 of file lapacke_cuncsd_work.c.

50 {
51  lapack_int info = 0;
52  /* LAPACK function works with matrices in both layouts. It is supported
53  * through TRANS parameter. So all conversion between layouts can be
54  * completed in LAPACK function. See the table below which describes how
55  * every LAPACKE call is forwarded to corresponding LAPACK call.
56  *
57  * matrix_layout | trans_LAPACKE | -> trans_LAPACK
58  * | (trans) | (ltrans)
59  * -----------------+---------------+----------------
60  * LAPACK_COL_MAJOR | 'N' | -> 'N'
61  * LAPACK_COL_MAJOR | 'T' | -> 'T'
62  * LAPACK_ROW_MAJOR | 'N' | -> 'T'
63  * LAPACK_ROW_MAJOR | 'T' | -> 'T'
64  * (note that for row major layout trans parameter is ignored)
65  */
66  if( matrix_layout == LAPACK_COL_MAJOR ||
67  matrix_layout == LAPACK_ROW_MAJOR ) {
68  char ltrans;
69  if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
70  ltrans = 'n';
71  } else {
72  ltrans = 't';
73  }
74  /* Call LAPACK function and adjust info */
75  LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
76  &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
77  &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
78  &ldv2t, work, &lwork, rwork, &lrwork, iwork, &info );
79  if( info < 0 ) {
80  info = info - 1;
81  }
82  } else {
83  info = -1;
84  LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
85  }
86  return info;
87 }
#define lapack_int
Definition: lapack.h:83
#define LAPACK_cuncsd(...)
Definition: lapack.h:22363
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:35
void LAPACKE_xerbla(const char *name, lapack_int info)
Here is the call graph for this function:
Here is the caller graph for this function: