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

Go to the source code of this file.

Functions

lapack_int LAPACKE_dsytri2 (int matrix_layout, char uplo, lapack_int n, double *a, lapack_int lda, const lapack_int *ipiv)

Function Documentation

◆ LAPACKE_dsytri2()

lapack_int LAPACKE_dsytri2 ( int matrix_layout,
char uplo,
lapack_int n,
double * a,
lapack_int lda,
const lapack_int * ipiv )

Definition at line 35 of file lapacke_dsytri2.c.

37{
38 lapack_int info = 0;
39 lapack_int lwork = -1;
40 double* work = NULL;
41 double work_query;
42 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
43 LAPACKE_xerbla( "LAPACKE_dsytri2", -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_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
50 return -4;
51 }
52 }
53#endif
54 /* Query optimal working array(s) size */
55 info = LAPACKE_dsytri2_work( matrix_layout, uplo, n, a, lda, ipiv,
56 &work_query, lwork );
57 if( info != 0 ) {
58 goto exit_level_0;
59 }
60 lwork = LAPACK_Z2INT( work_query );
61 /* Allocate memory for work arrays */
62 work = (double*)
63 LAPACKE_malloc( sizeof(double) * lwork );
64 if( work == NULL ) {
66 goto exit_level_0;
67 }
68 /* Call middle-level interface */
69 info = LAPACKE_dsytri2_work( matrix_layout, uplo, n, a, lda, ipiv, work,
70 lwork );
71 /* Release memory and exit */
72 LAPACKE_free( work );
73exit_level_0:
74 if( info == LAPACK_WORK_MEMORY_ERROR ) {
75 LAPACKE_xerbla( "LAPACKE_dsytri2", info );
76 }
77 return info;
78}
#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_dsytri2_work(int matrix_layout, char uplo, lapack_int n, double *a, lapack_int lda, const lapack_int *ipiv, double *work, lapack_int lwork)
#define LAPACKE_free(p)
Definition lapacke.h:46
#define LAPACK_ROW_MAJOR
Definition lapacke.h:52
int LAPACKE_get_nancheck(void)
#define LAPACK_Z2INT(x)
Definition lapacke.h:50
#define LAPACKE_malloc(size)
Definition lapacke.h:43
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_dsy_nancheck(int matrix_layout, char uplo, lapack_int n, const double *a, lapack_int lda)
n