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

Go to the source code of this file.

Functions

lapack_int LAPACKE_dorbdb (int matrix_layout, char trans, char signs, lapack_int m, lapack_int p, lapack_int q, double *x11, lapack_int ldx11, double *x12, lapack_int ldx12, double *x21, lapack_int ldx21, double *x22, lapack_int ldx22, double *theta, double *phi, double *taup1, double *taup2, double *tauq1, double *tauq2)

Function Documentation

◆ LAPACKE_dorbdb()

lapack_int LAPACKE_dorbdb ( int matrix_layout,
char trans,
char signs,
lapack_int m,
lapack_int p,
lapack_int q,
double * x11,
lapack_int ldx11,
double * x12,
lapack_int ldx12,
double * x21,
lapack_int ldx21,
double * x22,
lapack_int ldx22,
double * theta,
double * phi,
double * taup1,
double * taup2,
double * tauq1,
double * tauq2 )

Definition at line 35 of file lapacke_dorbdb.c.

42{
43 lapack_int info = 0;
44 lapack_int lwork = -1;
45 double* work = NULL;
46 double work_query;
47 int lapack_layout;
48 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
49 LAPACKE_xerbla( "LAPACKE_dorbdb", -1 );
50 return -1;
51 }
52 if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
53 lapack_layout = LAPACK_COL_MAJOR;
54 } else {
55 lapack_layout = LAPACK_ROW_MAJOR;
56 }
57#ifndef LAPACK_DISABLE_NAN_CHECK
58 if( LAPACKE_get_nancheck() ) {
59 /* Optionally check input matrices for NaNs */
60 if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
61 return -7;
62 }
63 if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
64 return -9;
65 }
66 if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
67 return -11;
68 }
69 if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
70 return -13;
71 }
72 }
73#endif
74 /* Query optimal working array(s) size */
75 info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
76 x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
77 taup1, taup2, tauq1, tauq2, &work_query,
78 lwork );
79 if( info != 0 ) {
80 goto exit_level_0;
81 }
82 lwork = (lapack_int)work_query;
83 /* Allocate memory for work arrays */
84 work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
85 if( work == NULL ) {
87 goto exit_level_0;
88 }
89 /* Call middle-level interface */
90 info = LAPACKE_dorbdb_work( matrix_layout, trans, signs, m, p, q, x11, ldx11,
91 x12, ldx12, x21, ldx21, x22, ldx22, theta, phi,
92 taup1, taup2, tauq1, tauq2, work, lwork );
93 /* Release memory and exit */
94 LAPACKE_free( work );
95exit_level_0:
96 if( info == LAPACK_WORK_MEMORY_ERROR ) {
97 LAPACKE_xerbla( "LAPACKE_dorbdb", info );
98 }
99 return info;
100}
#define lapack_int
Definition lapack.h:83
#define LAPACK_WORK_MEMORY_ERROR
Definition lapacke.h:55
#define LAPACK_COL_MAJOR
Definition lapacke.h:53
lapack_int LAPACKE_dorbdb_work(int matrix_layout, char trans, char signs, lapack_int m, lapack_int p, lapack_int q, double *x11, lapack_int ldx11, double *x12, lapack_int ldx12, double *x21, lapack_int ldx21, double *x22, lapack_int ldx22, double *theta, double *phi, double *taup1, double *taup2, double *tauq1, double *tauq2, double *work, lapack_int lwork)
#define LAPACKE_free(p)
Definition lapacke.h:46
#define LAPACK_ROW_MAJOR
Definition lapacke.h:52
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition lapacke.h:43
lapack_logical LAPACKE_lsame(char ca, char cb)
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_dge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const double *a, lapack_int lda)