LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
lapack_int LAPACKE_dorbdb ( int  matrix_layout,
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 *  phi,
double *  taup1,
double *  taup2,
double *  tauq1,
double *  tauq2 
)

Definition at line 36 of file lapacke_dorbdb.c.

43 {
44  lapack_int info = 0;
45  lapack_int lwork = -1;
46  double* work = NULL;
47  double work_query;
48  lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
49  if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
50  LAPACKE_xerbla( "LAPACKE_dorbdb", -1 );
51  return -1;
52  }
53 #ifndef LAPACK_DISABLE_NAN_CHECK
54  /* Optionally check input matrices for NaNs */
55  nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
56  nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
57  nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
58  nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
59  if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
60  return -7;
61  }
62  if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
63  return -9;
64  }
65  if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
66  return -11;
67  }
68  if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
69  return -13;
70  }
71 #endif
72  /* Query optimal working array(s) size */
73  info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
74  x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
75  taup1, taup2, tauq1, tauq2, &work_query,
76  lwork );
77  if( info != 0 ) {
78  goto exit_level_0;
79  }
80  lwork = (lapack_int)work_query;
81  /* Allocate memory for work arrays */
82  work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
83  if( work == NULL ) {
85  goto exit_level_0;
86  }
87  /* Call middle-level interface */
88  info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
89  x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
90  taup1, taup2, tauq1, tauq2, work, lwork );
91  /* Release memory and exit */
92  LAPACKE_free( work );
93 exit_level_0:
94  if( info == LAPACK_WORK_MEMORY_ERROR ) {
95  LAPACKE_xerbla( "LAPACKE_dorbdb", info );
96  }
97  return info;
98 }
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:122
lapack_logical LAPACKE_dge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const double *a, lapack_int lda)
#define LAPACKE_free(p)
Definition: lapacke.h:113
#define LAPACKE_malloc(size)
Definition: lapacke.h:110
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
lapack_int LAPACKE_dorbdb_work(int matrix_layout, 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 *phi, double *taup1, double *taup2, double *tauq1, double *tauq2, double *work, lapack_int lwork)

Here is the call graph for this function: