LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
lapack_int LAPACKE_dbdsvdx ( int  matrix_layout,
char  uplo,
char  jobz,
char  range,
lapack_int  n,
double *  d,
double *  e,
double  vl,
double  vu,
lapack_int  il,
lapack_int  iu,
lapack_int ns,
double *  s,
double *  z,
lapack_int  ldz,
lapack_int superb 
)

Definition at line 36 of file lapacke_dbdsvdx.c.

42 {
43  lapack_int info = 0;
44  lapack_int lwork = MAX(14*n,1);
45  double* work = NULL;
46  lapack_int* iwork = NULL;
47  lapack_int i;
48  if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
49  LAPACKE_xerbla( "LAPACKE_dbdsvdx", -1 );
50  return -1;
51  }
52 #ifndef LAPACK_DISABLE_NAN_CHECK
53  /* Optionally check input matrices for NaNs */
54  if( LAPACKE_d_nancheck( n, d, 1 ) ) {
55  return -6;
56  }
57  if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) {
58  return -7;
59  }
60 #endif
61  /* Allocate memory for work arrays */
62  work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
63  if( work == NULL ) {
65  goto exit_level_0;
66  }
67  iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(12*n,1) );
68  if( iwork == NULL ) {
70  goto exit_level_1;
71  }
72  /* Call middle-level interface */
73  info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz, range,
74  n, d, e, vl, vu, il, iu, ns, s, z,
75  ldz, work, iwork);
76  /* Backup significant data from working array(s) */
77  for( i=0; i<12*n-1; i++ ) {
78  superb[i] = iwork[i+1];
79  }
80  /* Release memory and exit */
81  LAPACKE_free( iwork );
82 exit_level_1:
83  LAPACKE_free( work );
84 exit_level_0:
85  if( info == LAPACK_WORK_MEMORY_ERROR ) {
86  LAPACKE_xerbla( "LAPACKE_dbdsvdx", info );
87  }
88  return info;
89 }
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:122
lapack_int LAPACKE_dbdsvdx_work(int matrix_layout, char uplo, char jobz, char range, lapack_int n, double *d, double *e, double vl, double vu, lapack_int il, lapack_int iu, lapack_int *ns, double *s, double *z, lapack_int ldz, double *work, lapack_int *iwork)
#define MAX(x, y)
Definition: lapacke_utils.h:47
#define LAPACKE_free(p)
Definition: lapacke.h:113
#define LAPACKE_malloc(size)
Definition: lapacke.h:110
lapack_logical LAPACKE_d_nancheck(lapack_int n, const double *x, lapack_int incx)
#define LAPACK_COL_MAJOR
Definition: lapacke.h:120
void LAPACKE_xerbla(const char *name, lapack_int info)
#define lapack_int
Definition: lapacke.h:47

Here is the call graph for this function: