LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ LAPACKE_dgtcon()

 lapack_int LAPACKE_dgtcon ( char norm, lapack_int n, const double * dl, const double * d, const double * du, const double * du2, const lapack_int * ipiv, double anorm, double * rcond )

Definition at line 35 of file lapacke_dgtcon.c.

38 {
39  lapack_int info = 0;
40  lapack_int* iwork = NULL;
41  double* work = NULL;
42 #ifndef LAPACK_DISABLE_NAN_CHECK
43  if( LAPACKE_get_nancheck() ) {
44  /* Optionally check input matrices for NaNs */
45  if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
46  return -8;
47  }
48  if( LAPACKE_d_nancheck( n, d, 1 ) ) {
49  return -4;
50  }
51  if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
52  return -3;
53  }
54  if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
55  return -5;
56  }
57  if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
58  return -6;
59  }
60  }
61 #endif
62  /* Allocate memory for working array(s) */
63  iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
64  if( iwork == NULL ) {
66  goto exit_level_0;
67  }
68  work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,2*n) );
69  if( work == NULL ) {
71  goto exit_level_1;
72  }
73  /* Call middle-level interface */
74  info = LAPACKE_dgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
75  work, iwork );
76  /* Release memory and exit */
77  LAPACKE_free( work );
78 exit_level_1:
79  LAPACKE_free( iwork );
80 exit_level_0:
81  if( info == LAPACK_WORK_MEMORY_ERROR ) {
82  LAPACKE_xerbla( "LAPACKE_dgtcon", info );
83  }
84  return info;
85 }
#define lapack_int
Definition: lapack.h:83
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:55
#define LAPACKE_free(p)
Definition: lapacke.h:46
lapack_int LAPACKE_dgtcon_work(char norm, lapack_int n, const double *dl, const double *d, const double *du, const double *du2, const lapack_int *ipiv, double anorm, double *rcond, double *work, lapack_int *iwork)
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition: lapacke.h:43
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_d_nancheck(lapack_int n, const double *x, lapack_int incx)
#define MAX(x, y)
Definition: lapacke_utils.h:46
Here is the call graph for this function: