LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_sorcsd_work()

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

Definition at line 35 of file lapacke_sorcsd_work.c.

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