LAPACK  3.7.1
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 36 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;
84 }
#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_sorcsd(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, lapack_int *info)
Here is the call graph for this function:
Here is the caller graph for this function: