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

Go to the source code of this file.

Functions/Subroutines

lapack_int LAPACKE_sggsvp (int matrix_order, char jobu, char jobv, char jobq, lapack_int m, lapack_int p, lapack_int n, float *a, lapack_int lda, float *b, lapack_int ldb, float tola, float tolb, lapack_int *k, lapack_int *l, float *u, lapack_int ldu, float *v, lapack_int ldv, float *q, lapack_int ldq)

Function/Subroutine Documentation

lapack_int LAPACKE_sggsvp ( int  matrix_order,
char  jobu,
char  jobv,
char  jobq,
lapack_int  m,
lapack_int  p,
lapack_int  n,
float *  a,
lapack_int  lda,
float *  b,
lapack_int  ldb,
float  tola,
float  tolb,
lapack_int k,
lapack_int l,
float *  u,
lapack_int  ldu,
float *  v,
lapack_int  ldv,
float *  q,
lapack_int  ldq 
)

Definition at line 36 of file lapacke_sggsvp.c.

{
lapack_int info = 0;
lapack_int* iwork = NULL;
float* tau = NULL;
float* work = NULL;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_sggsvp", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_sge_nancheck( matrix_order, m, n, a, lda ) ) {
return -8;
}
if( LAPACKE_sge_nancheck( matrix_order, p, n, b, ldb ) ) {
return -10;
}
if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
return -12;
}
if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
return -13;
}
#endif
/* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) );
if( iwork == NULL ) {
goto exit_level_0;
}
tau = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
if( tau == NULL ) {
goto exit_level_1;
}
work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX3(3*n,m,p)) );
if( work == NULL ) {
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_sggsvp_work( matrix_order, jobu, jobv, jobq, m, p, n, a, lda,
b, ldb, tola, tolb, k, l, u, ldu, v, ldv, q,
ldq, iwork, tau, work );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_2:
LAPACKE_free( tau );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_sggsvp", info );
}
return info;
}

Here is the call graph for this function: