gesvdx.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_GESVDX_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_GESVDX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/Complex.h>
45 
46 
47 //=================================================================================================
48 //
49 // LAPACK FORWARD DECLARATIONS
50 //
51 //=================================================================================================
52 
53 //*************************************************************************************************
55 extern "C" {
56 
57 void sgesvdx_( char* jobu, char* jobv, char* range, int* m, int* n, float* A, int* lda, float* vl, float* vu, int* il, int* iu, int* ns, float* s, float* U, int* ldu, float* V, int* ldv, float* work, int* lwork, int* iwork, int* info );
58 void dgesvdx_( char* jobu, char* jobv, char* range, int* m, int* n, double* A, int* lda, double* vl, double* vu, int* il, int* iu, int* ns, double* s, double* U, int* ldu, double* V, int* ldv, double* work, int* lwork, int* iwork, int* info );
59 void cgesvdx_( char* jobu, char* jobv, char* range, int* m, int* n, float* A, int* lda, float* vl, float* vu, int* il, int* iu, int* ns, float* s, float* U, int* ldu, float* V, int* ldv, float* work, int* lwork, float* rwork, int* iwork, int* info );
60 void zgesvdx_( char* jobu, char* jobv, char* range, int* m, int* n, double* A, int* lda, double* vl, double* vu, int* il, int* iu, int* ns, double* s, double* U, int* ldu, double* V, int* ldv, double* work, int* lwork, double* rwork, int* iwork, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK SVD FUNCTIONS (GESVDX)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void gesvdx( char jobu, char jobv, char range, int m, int n, float* A, int lda,
81  float vl, float vu, int il, int iu, int* ns,
82  float* s, float* U, int ldu, float* V, int ldv,
83  float* work, int lwork, int* iwork, int* info );
84 
85 inline void gesvdx( char jobu, char jobv, char range, int m, int n, double* A, int lda,
86  double vl, double vu, int il, int iu, int* ns,
87  double* s, double* U, int ldu, double* V, int ldv,
88  double* work, int lwork, int* iwork, int* info );
89 
90 inline void gesvdx( char jobu, char jobv, char range, int m, int n, complex<float>* A, int lda,
91  float vl, float vu, int il, int iu, int* ns,
92  float* s, complex<float>* U, int ldu, complex<float>* V, int ldv,
93  complex<float>* work, int lwork, float* rwork, int* iwork, int* info );
94 
95 inline void gesvdx( char jobu, char jobv, char range, int m, int n, complex<double>* A, int lda,
96  double vl, double vu, int il, int iu, int* ns,
97  double* s, complex<double>* U, int ldu, complex<double>* V, int ldv,
98  complex<double>* work, int lwork, double* rwork, int* iwork, int* info );
100 //*************************************************************************************************
101 
102 
103 //*************************************************************************************************
177 inline void gesvdx( char jobu, char jobv, char range, int m, int n, float* A, int lda,
178  float vl, float vu, int il, int iu, int* ns,
179  float* s, float* U, int ldu, float* V, int ldv,
180  float* work, int lwork, int* iwork, int* info )
181 {
182  ++il;
183  ++iu;
184 
185  sgesvdx_( &jobu, &jobv, &range, &m, &n, A, &lda, &vl, &vu, &il, &iu, ns,
186  s, U, &ldu, V, &ldv, work, &lwork, iwork, info );
187 }
188 //*************************************************************************************************
189 
190 
191 //*************************************************************************************************
265 inline void gesvdx( char jobu, char jobv, char range, int m, int n, double* A, int lda,
266  double vl, double vu, int il, int iu, int* ns,
267  double* s, double* U, int ldu, double* V, int ldv,
268  double* work, int lwork, int* iwork, int* info )
269 {
270  ++il;
271  ++iu;
272 
273  dgesvdx_( &jobu, &jobv, &range, &m, &n, A, &lda, &vl, &vu, &il, &iu, ns,
274  s, U, &ldu, V, &ldv, work, &lwork, iwork, info );
275 }
276 //*************************************************************************************************
277 
278 
279 //*************************************************************************************************
354 inline void gesvdx( char jobu, char jobv, char range, int m, int n, complex<float>* A, int lda,
355  float vl, float vu, int il, int iu, int* ns,
356  float* s, complex<float>* U, int ldu, complex<float>* V, int ldv,
357  complex<float>* work, int lwork, float* rwork, int* iwork, int* info )
358 {
359  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
360 
361  ++il;
362  ++iu;
363 
364  cgesvdx_( &jobu, &jobv, &range, &m, &n, reinterpret_cast<float*>( A ), &lda,
365  &vl, &vu, &il, &iu, ns, s,
366  reinterpret_cast<float*>( U ), &ldu, reinterpret_cast<float*>( V ), &ldv,
367  reinterpret_cast<float*>( work ), &lwork, rwork, iwork, info );
368 }
369 //*************************************************************************************************
370 
371 
372 //*************************************************************************************************
447 inline void gesvdx( char jobu, char jobv, char range, int m, int n, complex<double>* A, int lda,
448  double vl, double vu, int il, int iu, int* ns,
449  double* s, complex<double>* U, int ldu, complex<double>* V, int ldv,
450  complex<double>* work, int lwork, double* rwork, int* iwork, int* info )
451 {
452  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
453 
454  ++il;
455  ++iu;
456 
457  zgesvdx_( &jobu, &jobv, &range, &m, &n, reinterpret_cast<double*>( A ), &lda,
458  &vl, &vu, &il, &iu, ns, s,
459  reinterpret_cast<double*>( U ), &ldu, reinterpret_cast<double*>( V ), &ldv,
460  reinterpret_cast<double*>( work ), &lwork, rwork, iwork, info );
461 }
462 //*************************************************************************************************
463 
464 } // namespace blaze
465 
466 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
void gesvdx(char jobu, char jobv, char range, int m, int n, float *A, int lda, float vl, float vu, int il, int iu, int *ns, float *s, float *U, int ldu, float *V, int ldv, float *work, int lwork, int *iwork, int *info)
LAPACK kernel for the singular value decomposition (SVD) of the given dense general single precision ...
Definition: gesvdx.h:177
Header file for the complex data type.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112