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

Go to the source code of this file.

Functions/Subroutines

void LAPACKE_str_trans (int matrix_order, char uplo, char diag, lapack_int n, const float *in, lapack_int ldin, float *out, lapack_int ldout)

Function/Subroutine Documentation

void LAPACKE_str_trans ( int  matrix_order,
char  uplo,
char  diag,
lapack_int  n,
const float *  in,
lapack_int  ldin,
float *  out,
lapack_int  ldout 
)

Definition at line 40 of file lapacke_str_trans.c.

{
lapack_int i, j, st;
lapack_logical colmaj, lower, unit;
if( in == NULL || out == NULL ) return ;
colmaj = ( matrix_order == LAPACK_COL_MAJOR );
lower = LAPACKE_lsame( uplo, 'l' );
unit = LAPACKE_lsame( diag, 'u' );
if( ( !colmaj && ( matrix_order != LAPACK_ROW_MAJOR ) ) ||
( !lower && !LAPACKE_lsame( uplo, 'u' ) ) ||
( !unit && !LAPACKE_lsame( diag, 'n' ) ) ) {
/* Just exit if any of input parameters are wrong */
return;
}
if( unit ) {
/* If unit, then don't touch diagonal, start from 1st column or row */
st = 1;
} else {
/* If non-unit, then check diagonal also, starting from [0,0] */
st = 0;
}
/* Perform conversion:
* Since col_major upper and row_major lower are equal,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
if( ( colmaj || lower ) && !( colmaj && lower ) ) {
for( j = st; j < MIN( n, ldout ); j++ ) {
for( i = 0; i < MIN( j+1-st, ldin ); i++ ) {
out[ j+i*ldout ] = in[ i+j*ldin ];
}
}
} else {
for( j = 0; j < MIN( n-st, ldout ); j++ ) {
for( i = j+st; i < MIN( n, ldin ); i++ ) {
out[ j+i*ldout ] = in[ i+j*ldin ];
}
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function: