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

Definition at line 36 of file lapacke_sbdsvdx.c.

42 {
43  lapack_int info = 0;
44  lapack_int lwork = MAX(14*n,1);
45  float* 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_sbdsvdx", -1 );
50  return -1;
51  }
52 #ifndef LAPACK_DISABLE_NAN_CHECK
53  /* Optionally check input matrices for NaNs */
54  if( LAPACKE_s_nancheck( n, d, 1 ) ) {
55  return -6;
56  }
57  if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) {
58  return -7;
59  }
60 #endif
61  /* Allocate memory for work arrays */
62  work = (float*)LAPACKE_malloc( sizeof(float) * 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_sbdsvdx_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_sbdsvdx", info );
87  }
88  return info;
89 }
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:122
lapack_logical LAPACKE_s_nancheck(lapack_int n, const float *x, lapack_int incx)
#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_int LAPACKE_sbdsvdx_work(int matrix_layout, char uplo, char jobz, char range, lapack_int n, float *d, float *e, float vl, float vu, lapack_int il, lapack_int iu, lapack_int *ns, float *s, float *z, lapack_int ldz, float *work, lapack_int *iwork)
#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: