LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_dorbdb()

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 35 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  int lapack_layout;
49  if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
50  LAPACKE_xerbla( "LAPACKE_dorbdb", -1 );
51  return -1;
52  }
53  if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
54  lapack_layout = LAPACK_COL_MAJOR;
55  } else {
56  lapack_layout = LAPACK_ROW_MAJOR;
57  }
58 #ifndef LAPACK_DISABLE_NAN_CHECK
59  if( LAPACKE_get_nancheck() ) {
60  /* Optionally check input matrices for NaNs */
61  if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
62  return -7;
63  }
64  if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
65  return -9;
66  }
67  if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
68  return -11;
69  }
70  if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
71  return -13;
72  }
73  }
74 #endif
75  /* Query optimal working array(s) size */
76  info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
77  x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
78  taup1, taup2, tauq1, tauq2, &work_query,
79  lwork );
80  if( info != 0 ) {
81  goto exit_level_0;
82  }
83  lwork = (lapack_int)work_query;
84  /* Allocate memory for work arrays */
85  work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
86  if( work == NULL ) {
88  goto exit_level_0;
89  }
90  /* Call middle-level interface */
91  info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
92  x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
93  taup1, taup2, tauq1, tauq2, work, lwork );
94  /* Release memory and exit */
95  LAPACKE_free( work );
96 exit_level_0:
97  if( info == LAPACK_WORK_MEMORY_ERROR ) {
98  LAPACKE_xerbla( "LAPACKE_dorbdb", info );
99  }
100  return info;
Here is the call graph for this function:
LAPACKE_free
#define LAPACKE_free(p)
Definition: lapacke.h:47
lapack_int
#define lapack_int
Definition: lapack.h:21
LAPACKE_dge_nancheck
lapack_logical LAPACKE_dge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const double *a, lapack_int lda)
Definition: lapacke_dge_nancheck.c:36
LAPACK_WORK_MEMORY_ERROR
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:56
LAPACKE_xerbla
void LAPACKE_xerbla(const char *name, lapack_int info)
Definition: lapacke_xerbla.c:36
LAPACKE_malloc
#define LAPACKE_malloc(size)
Definition: lapacke.h:44
LAPACKE_get_nancheck
int LAPACKE_get_nancheck()
Definition: lapacke_nancheck.c:42
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
LAPACKE_dorbdb_work
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)
Definition: lapacke_dorbdb_work.c:35