OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lapacke_stbcon.c File Reference
#include "lapacke_utils.h"

Go to the source code of this file.

Functions

lapack_int LAPACKE_stbcon (int matrix_layout, char norm, char uplo, char diag, lapack_int n, lapack_int kd, const float *ab, lapack_int ldab, float *rcond)

Function Documentation

◆ LAPACKE_stbcon()

lapack_int LAPACKE_stbcon ( int matrix_layout,
char norm,
char uplo,
char diag,
lapack_int n,
lapack_int kd,
const float * ab,
lapack_int ldab,
float * rcond )

Definition at line 35 of file lapacke_stbcon.c.

38{
39 lapack_int info = 0;
40 lapack_int* iwork = NULL;
41 float* work = NULL;
42 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
43 LAPACKE_xerbla( "LAPACKE_stbcon", -1 );
44 return -1;
45 }
46#ifndef LAPACK_DISABLE_NAN_CHECK
47 if( LAPACKE_get_nancheck() ) {
48 /* Optionally check input matrices for NaNs */
49 if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
50 return -7;
51 }
52 }
53#endif
54 /* Allocate memory for working array(s) */
55 iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
56 if( iwork == NULL ) {
58 goto exit_level_0;
59 }
60 work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) );
61 if( work == NULL ) {
63 goto exit_level_1;
64 }
65 /* Call middle-level interface */
66 info = LAPACKE_stbcon_work( matrix_layout, norm, uplo, diag, n, kd, ab, ldab,
67 rcond, work, iwork );
68 /* Release memory and exit */
69 LAPACKE_free( work );
70exit_level_1:
71 LAPACKE_free( iwork );
72exit_level_0:
73 if( info == LAPACK_WORK_MEMORY_ERROR ) {
74 LAPACKE_xerbla( "LAPACKE_stbcon", info );
75 }
76 return info;
77}
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
#define lapack_int
Definition lapack.h:83
#define LAPACK_WORK_MEMORY_ERROR
Definition lapacke.h:55
#define LAPACK_COL_MAJOR
Definition lapacke.h:53
#define LAPACKE_free(p)
Definition lapacke.h:46
#define LAPACK_ROW_MAJOR
Definition lapacke.h:52
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition lapacke.h:43
lapack_int LAPACKE_stbcon_work(int matrix_layout, char norm, char uplo, char diag, lapack_int n, lapack_int kd, const float *ab, lapack_int ldab, float *rcond, float *work, lapack_int *iwork)
void LAPACKE_xerbla(const char *name, lapack_int info)
#define MAX(x, y)
lapack_logical LAPACKE_stb_nancheck(int matrix_layout, char uplo, char diag, lapack_int n, lapack_int kd, const float *ab, lapack_int ldab)
n