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

◆ LAPACKE_dtf_trans()

void LAPACKE_dtf_trans ( int  matrix_layout,
char  transr,
char  uplo,
char  diag,
lapack_int  n,
const double *  in,
double *  out 
)

Definition at line 40 of file lapacke_dtf_trans.c.

43{
44 lapack_int row, col;
45 lapack_logical rowmaj, ntr, lower, unit;
46
47 if( in == NULL || out == NULL ) return ;
48
49 rowmaj = (matrix_layout == LAPACK_ROW_MAJOR);
50 ntr = LAPACKE_lsame( transr, 'n' );
51 lower = LAPACKE_lsame( uplo, 'l' );
52 unit = LAPACKE_lsame( diag, 'u' );
53
54 if( ( !rowmaj && ( matrix_layout != LAPACK_COL_MAJOR ) ) ||
55 ( !ntr && !LAPACKE_lsame( transr, 't' ) &&
56 !LAPACKE_lsame( transr, 'c' ) ) ||
57 ( !lower && !LAPACKE_lsame( uplo, 'u' ) ) ||
58 ( !unit && !LAPACKE_lsame( diag, 'n' ) ) ) {
59 /* Just exit if input parameters are wrong */
60 return;
61 }
62
63 /* Determine parameters of array representing RFP */
64 if( ntr ) {
65 if( n%2 == 0 ) {
66 row = n + 1;
67 col = n / 2;
68 } else {
69 row = n;
70 col = (n + 1) / 2;
71 }
72 } else {
73 if( n%2 == 0 ) {
74 row = n / 2;
75 col = n + 1;
76 } else {
77 row = (n + 1) / 2;
78 col = n;
79 }
80 }
81
82 /* Perform conversion: */
83 if( rowmaj ) {
84 LAPACKE_dge_trans( LAPACK_ROW_MAJOR, row, col, in, col, out, row );
85 } else {
86 LAPACKE_dge_trans( LAPACK_COL_MAJOR, row, col, in, row, out, col );
87 }
88}
#define lapack_int
Definition: lapack.h:87
#define lapack_logical
Definition: lapack.h:103
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:35
void LAPACKE_dge_trans(int matrix_layout, lapack_int m, lapack_int n, const double *in, lapack_int ldin, double *out, lapack_int ldout)
Here is the call graph for this function:
Here is the caller graph for this function: