LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Classes Files Functions Variables Typedefs Macros
lapacke_dggbal.c File Reference
#include "lapacke_utils.h"
Include dependency graph for lapacke_dggbal.c:

Go to the source code of this file.

Functions/Subroutines

lapack_int LAPACKE_dggbal (int matrix_order, char job, lapack_int n, double *a, lapack_int lda, double *b, lapack_int ldb, lapack_int *ilo, lapack_int *ihi, double *lscale, double *rscale)

Function/Subroutine Documentation

lapack_int LAPACKE_dggbal ( int  matrix_order,
char  job,
lapack_int  n,
double *  a,
lapack_int  lda,
double *  b,
lapack_int  ldb,
lapack_int ilo,
lapack_int ihi,
double *  lscale,
double *  rscale 
)

Definition at line 36 of file lapacke_dggbal.c.

{
lapack_int info = 0;
/* Additional scalars declarations for work arrays */
lapack_int lwork;
double* work = NULL;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_dggbal", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
LAPACKE_lsame( job, 'b' ) ) {
if( LAPACKE_dge_nancheck( matrix_order, n, n, a, lda ) ) {
return -4;
}
}
if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
LAPACKE_lsame( job, 'b' ) ) {
if( LAPACKE_dge_nancheck( matrix_order, n, n, b, ldb ) ) {
return -6;
}
}
#endif
/* Additional scalars initializations for work arrays */
if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
lwork = MAX(1,6*n);
} else {
lwork = 1;
}
/* Allocate memory for working array(s) */
work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_dggbal_work( matrix_order, job, n, a, lda, b, ldb, ilo, ihi,
lscale, rscale, work );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_dggbal", info );
}
return info;
}

Here is the call graph for this function: