LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_cunbdb()

lapack_int LAPACKE_cunbdb ( int  matrix_layout,
char  trans,
char  signs,
lapack_int  m,
lapack_int  p,
lapack_int  q,
lapack_complex_float x11,
lapack_int  ldx11,
lapack_complex_float x12,
lapack_int  ldx12,
lapack_complex_float x21,
lapack_int  ldx21,
lapack_complex_float x22,
lapack_int  ldx22,
float *  theta,
float *  phi,
lapack_complex_float taup1,
lapack_complex_float taup2,
lapack_complex_float tauq1,
lapack_complex_float tauq2 
)

Definition at line 35 of file lapacke_cunbdb.c.

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