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

Go to the source code of this file.

Functions/Subroutines

lapack_int LAPACKE_dgesvj (int matrix_order, char joba, char jobu, char jobv, lapack_int m, lapack_int n, double *a, lapack_int lda, double *sva, lapack_int mv, double *v, lapack_int ldv, double *stat)

Function/Subroutine Documentation

lapack_int LAPACKE_dgesvj ( int  matrix_order,
char  joba,
char  jobu,
char  jobv,
lapack_int  m,
lapack_int  n,
double *  a,
lapack_int  lda,
double *  sva,
lapack_int  mv,
double *  v,
lapack_int  ldv,
double *  stat 
)

Definition at line 36 of file lapacke_dgesvj.c.

{
lapack_int info = 0;
lapack_int lwork = MAX(6,m+n);
double* work = NULL;
lapack_int nrows_v;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_dgesvj", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
if( LAPACKE_dge_nancheck( matrix_order, m, n, a, lda ) ) {
return -7;
}
if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
if( LAPACKE_dge_nancheck( matrix_order, nrows_v, n, v, ldv ) ) {
return -11;
}
}
#endif
/* Allocate memory for working array(s) */
work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {
goto exit_level_0;
}
work[0] = stat[0]; /* Significant if jobu = 'c' */
/* Call middle-level interface */
info = LAPACKE_dgesvj_work( matrix_order, joba, jobu, jobv, m, n, a, lda,
sva, mv, v, ldv, work, lwork );
/* Backup significant data from working array(s) */
for( i=0; i<6; i++ ) {
stat[i] = work[i];
}
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_dgesvj", info );
}
return info;
}

Here is the call graph for this function: