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

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

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

Definition at line 36 of file lapacke_stgsja.c.

{
lapack_int info = 0;
float* work = NULL;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_stgsja", -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 -10;
}
if( LAPACKE_sge_nancheck( matrix_order, p, n, b, ldb ) ) {
return -12;
}
if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
if( LAPACKE_sge_nancheck( matrix_order, n, n, q, ldq ) ) {
return -22;
}
}
if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
return -14;
}
if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
return -15;
}
if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
if( LAPACKE_sge_nancheck( matrix_order, m, m, u, ldu ) ) {
return -18;
}
}
if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
if( LAPACKE_sge_nancheck( matrix_order, p, p, v, ldv ) ) {
return -20;
}
}
#endif
/* Allocate memory for working array(s) */
work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
if( work == NULL ) {
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_stgsja_work( matrix_order, jobu, jobv, jobq, m, p, n, k, l,
a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu,
v, ldv, q, ldq, work, ncycle );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_stgsja", info );
}
return info;
}

Here is the call graph for this function: