LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ LAPACKE_sgb_trans()

 void LAPACKE_sgb_trans ( int matrix_layout, lapack_int m, lapack_int n, lapack_int kl, lapack_int ku, const float * in, lapack_int ldin, float * out, lapack_int ldout )

Definition at line 39 of file lapacke_sgb_trans.c.

43{
44 lapack_int i, j;
45
46 if( in == NULL || out == NULL ) return;
47
48 if( matrix_layout == LAPACK_COL_MAJOR ) {
49 for( j = 0; j < MIN( ldout, n ); j++ ) {
50 for( i = MAX( ku-j, 0 ); i < MIN3( ldin, m+ku-j, kl+ku+1 );
51 i++ ) {
52 out[(size_t)i*ldout+j] = in[i+(size_t)j*ldin];
53 }
54 }
55 } else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
56 /* TODO: interchange loops for performance.
57 * This is just reference impemeltation.
58 */
59 for( j = 0; j < MIN( n, ldin ); j++ ) {
60 for( i = MAX( ku-j, 0 ); i < MIN3( ldout, m+ku-j, kl+ku+1 );
61 i++ ) {
62 out[i+(size_t)j*ldout] = in[(size_t)i*ldin+j];
63 }
64 }
65 }
66}
#define lapack_int
Definition: lapack.h:87
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
#define MIN(x, y)
Definition: lapacke_utils.h:49
#define MAX(x, y)
Definition: lapacke_utils.h:46
#define MIN3(x, y, z)
Definition: lapacke_utils.h:55
Here is the caller graph for this function: