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

Go to the source code of this file.

Functions

lapack_int LAPACKE_dgbrfsx (int matrix_layout, char trans, char equed, lapack_int n, lapack_int kl, lapack_int ku, lapack_int nrhs, const double *ab, lapack_int ldab, const double *afb, lapack_int ldafb, const lapack_int *ipiv, const double *r, const double *c, const double *b, lapack_int ldb, double *x, lapack_int ldx, double *rcond, double *berr, lapack_int n_err_bnds, double *err_bnds_norm, double *err_bnds_comp, lapack_int nparams, double *params)

Function Documentation

◆ LAPACKE_dgbrfsx()

lapack_int LAPACKE_dgbrfsx ( int matrix_layout,
char trans,
char equed,
lapack_int n,
lapack_int kl,
lapack_int ku,
lapack_int nrhs,
const double * ab,
lapack_int ldab,
const double * afb,
lapack_int ldafb,
const lapack_int * ipiv,
const double * r,
const double * c,
const double * b,
lapack_int ldb,
double * x,
lapack_int ldx,
double * rcond,
double * berr,
lapack_int n_err_bnds,
double * err_bnds_norm,
double * err_bnds_comp,
lapack_int nparams,
double * params )

Definition at line 35 of file lapacke_dgbrfsx.c.

45{
46 lapack_int info = 0;
47 lapack_int* iwork = NULL;
48 double* work = NULL;
49 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
50 LAPACKE_xerbla( "LAPACKE_dgbrfsx", -1 );
51 return -1;
52 }
53#ifndef LAPACK_DISABLE_NAN_CHECK
54 if( LAPACKE_get_nancheck() ) {
55 /* Optionally check input matrices for NaNs */
56 if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
57 return -8;
58 }
59 if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
60 return -10;
61 }
62 if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
63 return -15;
64 }
65 if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
66 if( LAPACKE_d_nancheck( n, c, 1 ) ) {
67 return -14;
68 }
69 }
70 if( nparams>0 ) {
71 if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
72 return -25;
73 }
74 }
75 if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
76 if( LAPACKE_d_nancheck( n, r, 1 ) ) {
77 return -13;
78 }
79 }
80 if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
81 return -17;
82 }
83 }
84#endif
85 /* Allocate memory for working array(s) */
86 iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
87 if( iwork == NULL ) {
89 goto exit_level_0;
90 }
91 work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,4*n) );
92 if( work == NULL ) {
94 goto exit_level_1;
95 }
96 /* Call middle-level interface */
97 info = LAPACKE_dgbrfsx_work( matrix_layout, trans, equed, n, kl, ku, nrhs,
98 ab, ldab, afb, ldafb, ipiv, r, c, b, ldb, x,
99 ldx, rcond, berr, n_err_bnds, err_bnds_norm,
100 err_bnds_comp, nparams, params, work, iwork );
101 /* Release memory and exit */
102 LAPACKE_free( work );
103exit_level_1:
104 LAPACKE_free( iwork );
105exit_level_0:
106 if( info == LAPACK_WORK_MEMORY_ERROR ) {
107 LAPACKE_xerbla( "LAPACKE_dgbrfsx", info );
108 }
109 return info;
110}
#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)
lapack_int LAPACKE_dgbrfsx_work(int matrix_layout, char trans, char equed, lapack_int n, lapack_int kl, lapack_int ku, lapack_int nrhs, const double *ab, lapack_int ldab, const double *afb, lapack_int ldafb, const lapack_int *ipiv, const double *r, const double *c, const double *b, lapack_int ldb, double *x, lapack_int ldx, double *rcond, double *berr, lapack_int n_err_bnds, double *err_bnds_norm, double *err_bnds_comp, lapack_int nparams, double *params, double *work, lapack_int *iwork)
#define LAPACKE_malloc(size)
Definition lapacke.h:43
lapack_logical LAPACKE_lsame(char ca, char cb)
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)
lapack_logical LAPACKE_dge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const double *a, lapack_int lda)
lapack_logical LAPACKE_dgb_nancheck(int matrix_layout, lapack_int m, lapack_int n, lapack_int kl, lapack_int ku, const double *ab, lapack_int ldab)
n