OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lapacke_sorcsd_work.c File Reference
#include "lapacke_utils.h"

Go to the source code of this file.

Functions

lapack_int LAPACKE_sorcsd_work (int matrix_layout, char jobu1, char jobu2, char jobv1t, char jobv2t, char trans, char signs, lapack_int m, lapack_int p, lapack_int q, float *x11, lapack_int ldx11, float *x12, lapack_int ldx12, float *x21, lapack_int ldx21, float *x22, lapack_int ldx22, float *theta, float *u1, lapack_int ldu1, float *u2, lapack_int ldu2, float *v1t, lapack_int ldv1t, float *v2t, lapack_int ldv2t, float *work, lapack_int lwork, lapack_int *iwork)

Function Documentation

◆ LAPACKE_sorcsd_work()

lapack_int LAPACKE_sorcsd_work ( int matrix_layout,
char jobu1,
char jobu2,
char jobv1t,
char jobv2t,
char trans,
char signs,
lapack_int m,
lapack_int p,
lapack_int q,
float * x11,
lapack_int ldx11,
float * x12,
lapack_int ldx12,
float * x21,
lapack_int ldx21,
float * x22,
lapack_int ldx22,
float * theta,
float * u1,
lapack_int ldu1,
float * u2,
lapack_int ldu2,
float * v1t,
lapack_int ldv1t,
float * v2t,
lapack_int ldv2t,
float * work,
lapack_int lwork,
lapack_int * iwork )

Definition at line 35 of file lapacke_sorcsd_work.c.

46{
47 lapack_int info = 0;
48 /* LAPACK function works with matrices in both layouts. It is supported
49 * through TRANS parameter. So all conversion between layouts can be
50 * completed in LAPACK function. See the table below which describes how
51 * every LAPACKE call is forwarded to corresponding LAPACK call.
52 *
53 * matrix_layout | trans_LAPACKE | -> trans_LAPACK
54 * | (trans) | (ltrans)
55 * -----------------+---------------+----------------
56 * LAPACK_COL_MAJOR | 'N' | -> 'N'
57 * LAPACK_COL_MAJOR | 'T' | -> 'T'
58 * LAPACK_ROW_MAJOR | 'N' | -> 'T'
59 * LAPACK_ROW_MAJOR | 'T' | -> 'T'
60 * (note that for row major layout trans parameter is ignored)
61 */
62 if( matrix_layout == LAPACK_COL_MAJOR ||
63 matrix_layout == LAPACK_ROW_MAJOR ) {
64 char ltrans;
65 if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
66 ltrans = 'n';
67 } else {
68 ltrans = 't';
69 }
70 /* Call LAPACK function and adjust info */
71 LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
72 &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
73 &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
74 &ldv2t, work, &lwork, iwork, &info );
75 if( info < 0 ) {
76 info = info - 1;
77 }
78 } else {
79 info = -1;
80 LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
81 }
82 return info;
83}
#define lapack_int
Definition lapack.h:83
#define LAPACK_sorcsd(...)
Definition lapack.h:11279
#define LAPACK_COL_MAJOR
Definition lapacke.h:53
#define LAPACK_ROW_MAJOR
Definition lapacke.h:52
lapack_logical LAPACKE_lsame(char ca, char cb)
void LAPACKE_xerbla(const char *name, lapack_int info)