LAPACK  3.10.1
LAPACK: Linear Algebra PACKage

◆ LAPACKE_dorcsd_work()

lapack_int LAPACKE_dorcsd_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,
double *  x11,
lapack_int  ldx11,
double *  x12,
lapack_int  ldx12,
double *  x21,
lapack_int  ldx21,
double *  x22,
lapack_int  ldx22,
double *  theta,
double *  u1,
lapack_int  ldu1,
double *  u2,
lapack_int  ldu2,
double *  v1t,
lapack_int  ldv1t,
double *  v2t,
lapack_int  ldv2t,
double *  work,
lapack_int  lwork,
lapack_int iwork 
)

Definition at line 35 of file lapacke_dorcsd_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_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
72  &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
73  &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
74  &ldv2t, work, &lwork, iwork, &info );
75  if( info < 0 ) {
76  info = info - 1;
77  }
78  } else {
79  info = -1;
80  LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
81  }
82  return info;
83 }
#define LAPACK_dorcsd(...)
Definition: lapack.h:11253
#define lapack_int
Definition: lapack.h:83
#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: