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

Go to the source code of this file.

Functions

lapack_int LAPACKE_dtrcon (int matrix_layout, char norm, char uplo, char diag, lapack_int n, const double *a, lapack_int lda, double *rcond)

Function Documentation

◆ LAPACKE_dtrcon()

lapack_int LAPACKE_dtrcon ( int matrix_layout,
char norm,
char uplo,
char diag,
lapack_int n,
const double * a,
lapack_int lda,
double * rcond )

Definition at line 35 of file lapacke_dtrcon.c.

38{
39 lapack_int info = 0;
40 lapack_int* iwork = NULL;
41 double* work = NULL;
42 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
43 LAPACKE_xerbla( "LAPACKE_dtrcon", -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_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
50 return -6;
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 = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,3*n) );
61 if( work == NULL ) {
63 goto exit_level_1;
64 }
65 /* Call middle-level interface */
66 info = LAPACKE_dtrcon_work( matrix_layout, norm, uplo, diag, n, a, lda,
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_dtrcon", 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
lapack_int LAPACKE_dtrcon_work(int matrix_layout, char norm, char uplo, char diag, lapack_int n, const double *a, lapack_int lda, double *rcond, double *work, lapack_int *iwork)
#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
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_dtr_nancheck(int matrix_layout, char uplo, char diag, lapack_int n, const double *a, lapack_int lda)
#define MAX(x, y)
n