LAPACK 3.11.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ LAPACKE_sgtcon()

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

Definition at line 35 of file lapacke_sgtcon.c.

38{
39 lapack_int info = 0;
40 lapack_int* iwork = NULL;
41 float* work = NULL;
42#ifndef LAPACK_DISABLE_NAN_CHECK
43 if( LAPACKE_get_nancheck() ) {
44 /* Optionally check input matrices for NaNs */
45 if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
46 return -8;
47 }
48 if( LAPACKE_s_nancheck( n, d, 1 ) ) {
49 return -4;
50 }
51 if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
52 return -3;
53 }
54 if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
55 return -5;
56 }
57 if( LAPACKE_s_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 = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
69 if( work == NULL ) {
71 goto exit_level_1;
72 }
73 /* Call middle-level interface */
74 info = LAPACKE_sgtcon_work( norm, n, dl, d, du, du2, ipiv, anorm, rcond,
75 work, iwork );
76 /* Release memory and exit */
77 LAPACKE_free( work );
78exit_level_1:
79 LAPACKE_free( iwork );
80exit_level_0:
81 if( info == LAPACK_WORK_MEMORY_ERROR ) {
82 LAPACKE_xerbla( "LAPACKE_sgtcon", info );
83 }
84 return info;
85}
#define lapack_int
Definition: lapack.h:87
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:55
lapack_int LAPACKE_sgtcon_work(char norm, lapack_int n, const float *dl, const float *d, const float *du, const float *du2, const lapack_int *ipiv, float anorm, float *rcond, float *work, lapack_int *iwork)
#define LAPACKE_free(p)
Definition: lapacke.h:46
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_s_nancheck(lapack_int n, const float *x, lapack_int incx)
#define MAX(x, y)
Definition: lapacke_utils.h:46
Here is the call graph for this function: