Blaze 3.9
gges.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_LAPACK_CLAPACK_GGES_H_
36#define _BLAZE_MATH_LAPACK_CLAPACK_GGES_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/util/Complex.h>
46#include <blaze/util/Types.h>
47
48
49//=================================================================================================
50//
51// LAPACK FORWARD DECLARATIONS
52//
53//=================================================================================================
54
55//*************************************************************************************************
57#if !defined(INTEL_MKL_VERSION)
58extern "C" {
59
60void sgges_( char* jobvsl, char* jobvsr, char* sort,
61 blaze::blas_int_t (*selctg)( const float*, const float*, const float* ),
62 blaze::blas_int_t* n, float* A, blaze::blas_int_t* lda, float* B, blaze::blas_int_t* ldb,
63 blaze::blas_int_t* sdim, float* alphar, float* alphai, float* beta, float* VSL,
64 blaze::blas_int_t* ldvsl, float* VSR, blaze::blas_int_t* ldvsr, float* work,
68void dgges_( char* jobvsl, char* jobvsr, char* sort,
69 blaze::blas_int_t (*selctg)( const double*, const double*, const double* ),
70 blaze::blas_int_t* n, double* A, blaze::blas_int_t* lda, double* B, blaze::blas_int_t* ldb,
71 blaze::blas_int_t* sdim, double* alphar, double* alphai, double* beta, double* VSL,
72 blaze::blas_int_t* ldvsl, double* VSR, blaze::blas_int_t* ldvsr, double* work,
76void cgges_( char* jobvsl, char* jobvsr, char* sort,
77 blaze::blas_int_t (*selctg)( const float*, const float* ),
78 blaze::blas_int_t* n, float* A, blaze::blas_int_t* lda, float* B, blaze::blas_int_t* ldb,
79 blaze::blas_int_t* sdim, float* alpha, float* beta, float* VSL, blaze::blas_int_t* ldvsl,
80 float* VSR, blaze::blas_int_t* ldvsr, float* work, blaze::blas_int_t* lwork,
81 float* rwork, blaze::blas_int_t* bwork, blaze::blas_int_t* info,
84void zgges_( char* jobvsl, char* jobvsr, char* sort,
85 blaze::blas_int_t (*selctg)( const double*, const double* ),
86 blaze::blas_int_t* n, double* A, blaze::blas_int_t* lda, double* B, blaze::blas_int_t* ldb,
87 blaze::blas_int_t* sdim, double* alpha, double* beta, double* VSL, blaze::blas_int_t* ldvsl,
88 double* VSR, blaze::blas_int_t* ldvsr, double* work, blaze::blas_int_t* lwork,
89 double* rwork, blaze::blas_int_t* bwork, blaze::blas_int_t* info,
92
93}
94#endif
96//*************************************************************************************************
97
98
99
100
101namespace blaze {
102
103//=================================================================================================
104//
105// LAPACK GENERALIZED SCHUR DECOMPOSITION FUNCTIONS (GGES)
106//
107//=================================================================================================
108
109//*************************************************************************************************
112void gges( char jobvsl, char jobvsr, char sort,
113 blas_int_t (*selctg)( const float*, const float*, const float* ), blas_int_t n,
114 float* A, blas_int_t lda, float* B, blas_int_t ldb,
115 blas_int_t* sdim, float* alphar, float* alphai, float* beta,
116 float* VSL, blas_int_t ldvsl, float* VSR,
117 blas_int_t ldvsr, float* work, blas_int_t lwork,
118 blas_int_t* bwork, blas_int_t* info );
119
120void gges( char jobvsl, char jobvsr, char sort,
121 blas_int_t (*selctg)( const double*, const double*, const double* ), blas_int_t n,
122 double* A, blas_int_t lda, double* B, blas_int_t ldb,
123 blas_int_t* sdim, double* alphar, double* alphai, double* beta,
124 double* VSL, blas_int_t ldvsl, double* VSR,
125 blas_int_t ldvsr, double* work, blas_int_t lwork,
126 blas_int_t* bwork, blas_int_t* info );
127
128void gges( char jobvsl, char jobvsr, char sort,
129 blas_int_t (*selctg)( const complex<float>*, const complex<float>* ), blas_int_t n,
131 blas_int_t* sdim, complex<float>* alpha, complex<float>* beta,
132 complex<float>* VSL, blas_int_t ldvsl, complex<float>* VSR,
133 blas_int_t ldvsr, complex<float>* work, blas_int_t lwork,
134 float* rwork, blas_int_t* bwork, blas_int_t* info );
135
136void gges( char jobvsl, char jobvsr, char sort,
137 blas_int_t (*selctg)( const complex<double>*, const complex<double>* ), blas_int_t n,
139 blas_int_t* sdim, complex<double>* alpha, complex<double>* beta,
141 blas_int_t ldvsr, complex<double>* work, blas_int_t lwork,
142 double* rwork, blas_int_t* bwork, blas_int_t* info );
144//*************************************************************************************************
145
146
147//*************************************************************************************************
227inline void gges( char jobvsl, char jobvsr, char sort,
228 blas_int_t (*selctg)( const float*, const float*, const float* ), blas_int_t n,
229 float* A, blas_int_t lda, float* B, blas_int_t ldb,
230 blas_int_t* sdim, float* alphar, float* alphai, float* beta,
231 float* VSL, blas_int_t ldvsl, float* VSR,
232 blas_int_t ldvsr, float* work, blas_int_t lwork,
233 blas_int_t* bwork, blas_int_t* info )
234{
235#if defined(INTEL_MKL_VERSION)
236 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
237#endif
238
239 sgges_( &jobvsl, &jobvsr, &sort, selctg, &n, A, &lda, B, &ldb, sdim, alphar, alphai, beta,
240 VSL, &ldvsl, VSR, &ldvsr, work, &lwork, bwork, info
241#if !defined(INTEL_MKL_VERSION)
243#endif
244 );
245}
246//*************************************************************************************************
247
248
249//*************************************************************************************************
329inline void gges( char jobvsl, char jobvsr, char sort,
330 blas_int_t (*selctg)( const double*, const double*, const double* ), blas_int_t n,
331 double* A, blas_int_t lda, double* B, blas_int_t ldb,
332 blas_int_t* sdim, double* alphar, double* alphai, double* beta,
333 double* VSL, blas_int_t ldvsl, double* VSR,
334 blas_int_t ldvsr, double* work, blas_int_t lwork,
335 blas_int_t* bwork, blas_int_t* info )
336{
337#if defined(INTEL_MKL_VERSION)
338 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
339#endif
340
341 dgges_( &jobvsl, &jobvsr, &sort, selctg, &n, A, &lda, B, &ldb, sdim, alphar, alphai, beta,
342 VSL, &ldvsl, VSR, &ldvsr, work, &lwork, bwork, info
343#if !defined(INTEL_MKL_VERSION)
345#endif
346 );
347}
348//*************************************************************************************************
349
350
351//*************************************************************************************************
431inline void gges( char jobvsl, char jobvsr, char sort,
432 blas_int_t (*selctg)( const complex<float>*, const complex<float>* ), blas_int_t n,
433 complex<float>* A, blas_int_t lda, complex<float>* B, blas_int_t ldb,
434 blas_int_t* sdim, complex<float>* alpha, complex<float>* beta,
435 complex<float>* VSL, blas_int_t ldvsl, complex<float>* VSR,
436 blas_int_t ldvsr, complex<float>* work, blas_int_t lwork,
437 float* rwork, blas_int_t* bwork, blas_int_t* info )
438{
439 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
440
441#if defined(INTEL_MKL_VERSION)
442 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
443 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex8 ) == sizeof( complex<float> ) );
444 using ET = MKL_Complex8;
445 using Selctg = MKL_INT (*)( const ET*, const ET* );
446#else
447 using ET = float;
448 using Selctg = blas_int_t (*)( const ET*, const ET* );
449#endif
450
451 cgges_( &jobvsl, &jobvsr, &sort, reinterpret_cast<Selctg>( selctg ), &n,
452 reinterpret_cast<ET*>( A ), &lda, reinterpret_cast<ET*>( B ), &ldb, sdim,
453 reinterpret_cast<ET*>( alpha ), reinterpret_cast<ET*>( beta ),
454 reinterpret_cast<ET*>( VSL ), &ldvsl, reinterpret_cast<ET*>( VSR ), &ldvsr,
455 reinterpret_cast<ET*>( work ), &lwork, rwork, bwork, info
456#if !defined(INTEL_MKL_VERSION)
458#endif
459 );
460}
461//*************************************************************************************************
462
463
464//*************************************************************************************************
544inline void gges( char jobvsl, char jobvsr, char sort,
545 blas_int_t (*selctg)( const complex<double>*, const complex<double>* ), blas_int_t n,
546 complex<double>* A, blas_int_t lda, complex<double>* B, blas_int_t ldb,
547 blas_int_t* sdim, complex<double>* alpha, complex<double>* beta,
548 complex<double>* VSL, blas_int_t ldvsl, complex<double>* VSR,
549 blas_int_t ldvsr, complex<double>* work, blas_int_t lwork,
550 double* rwork, blas_int_t* bwork, blas_int_t* info )
551{
552 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
553
554#if defined(INTEL_MKL_VERSION)
555 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
556 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex16 ) == sizeof( complex<double> ) );
557 using ET = MKL_Complex16;
558 using Selctg = MKL_INT (*)( const ET*, const ET* );
559#else
560 using ET = double;
561 using Selctg = blas_int_t (*)( const ET*, const ET* );
562#endif
563
564 zgges_( &jobvsl, &jobvsr, &sort, reinterpret_cast<Selctg>( selctg ), &n,
565 reinterpret_cast<ET*>( A ), &lda, reinterpret_cast<ET*>( B ), &ldb, sdim,
566 reinterpret_cast<ET*>( alpha ), reinterpret_cast<ET*>( beta ),
567 reinterpret_cast<ET*>( VSL ), &ldvsl, reinterpret_cast<ET*>( VSR ), &ldvsr,
568 reinterpret_cast<ET*>( work ), &lwork, rwork, bwork, info
569#if !defined(INTEL_MKL_VERSION)
571#endif
572 );
573}
574//*************************************************************************************************
575
576} // namespace blaze
577
578#endif
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
void gges(DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, DenseMatrix< MT3, SO3 > &VSL, DenseVector< VT1, TF1 > &alpha, DenseVector< VT2, TF2 > &beta, DenseMatrix< MT4, SO4 > &VSR, Select select)
LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general ma...
Definition: gges.h:945
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition: Types.h:186
Header file for basic BLAS type definitions.
Header file for basic type definitions.