Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
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/math/blas/Types.h
>
44
#include <
blaze/util/Complex.h
>
45
#include <
blaze/util/StaticAssert.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) || (INTEL_MKL_VERSION < 20170000)
58
extern
"C"
{
59
60
void
sgesvdx_(
char
* jobu,
char
* jobv,
char
* range,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
61
float
* A,
blaze::blas_int_t
* lda,
float
* vl,
float
* vu,
blaze::blas_int_t
* il,
62
blaze::blas_int_t
* iu,
blaze::blas_int_t
* ns,
float
* s,
float
* U,
63
blaze::blas_int_t
* ldu,
float
* V,
blaze::blas_int_t
* ldv,
float
* work,
64
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* iwork,
blaze::blas_int_t
* info,
65
blaze::fortran_charlen_t
njobu,
blaze::fortran_charlen_t
njobv,
66
blaze::fortran_charlen_t
nrange );
67
void
dgesvdx_(
char
* jobu,
char
* jobv,
char
* range,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
68
double
* A,
blaze::blas_int_t
* lda,
double
* vl,
double
* vu,
blaze::blas_int_t
* il,
69
blaze::blas_int_t
* iu,
blaze::blas_int_t
* ns,
double
* s,
double
* U,
70
blaze::blas_int_t
* ldu,
double
* V,
blaze::blas_int_t
* ldv,
double
* work,
71
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* iwork,
blaze::blas_int_t
* info,
72
blaze::fortran_charlen_t
njobu,
blaze::fortran_charlen_t
njobv,
73
blaze::fortran_charlen_t
nrange );
74
void
cgesvdx_(
char
* jobu,
char
* jobv,
char
* range,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
75
float
* A,
blaze::blas_int_t
* lda,
float
* vl,
float
* vu,
blaze::blas_int_t
* il,
76
blaze::blas_int_t
* iu,
blaze::blas_int_t
* ns,
float
* s,
float
* U,
77
blaze::blas_int_t
* ldu,
float
* V,
blaze::blas_int_t
* ldv,
float
* work,
78
blaze::blas_int_t
* lwork,
float
* rwork,
blaze::blas_int_t
* iwork,
79
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
njobu,
80
blaze::fortran_charlen_t
njobv,
blaze::fortran_charlen_t
nrange );
81
void
zgesvdx_(
char
* jobu,
char
* jobv,
char
* range,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
82
double
* A,
blaze::blas_int_t
* lda,
double
* vl,
double
* vu,
blaze::blas_int_t
* il,
83
blaze::blas_int_t
* iu,
blaze::blas_int_t
* ns,
double
* s,
double
* U,
84
blaze::blas_int_t
* ldu,
double
* V,
blaze::blas_int_t
* ldv,
double
* work,
85
blaze::blas_int_t
* lwork,
double
* rwork,
blaze::blas_int_t
* iwork,
86
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
njobu,
87
blaze::fortran_charlen_t
njobv,
blaze::fortran_charlen_t
nrange );
88
89
}
90
#endif
92
//*************************************************************************************************
93
94
95
96
97
namespace
blaze {
98
99
//=================================================================================================
100
//
101
// LAPACK SVD FUNCTIONS (GESVDX)
102
//
103
//=================================================================================================
104
105
//*************************************************************************************************
108
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
109
float
* A,
blas_int_t
lda,
float
vl,
float
vu,
110
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
float
* s,
111
float
* U,
blas_int_t
ldu,
float
* V,
blas_int_t
ldv,
112
float
* work,
blas_int_t
lwork,
blas_int_t
* iwork,
113
blas_int_t
* info );
114
115
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
116
double
* A,
blas_int_t
lda,
double
vl,
double
vu,
117
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
double
* s,
118
double
* U,
blas_int_t
ldu,
double
* V,
blas_int_t
ldv,
119
double
* work,
blas_int_t
lwork,
blas_int_t
* iwork,
120
blas_int_t
* info );
121
122
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
123
complex<float>* A,
blas_int_t
lda,
float
vl,
float
vu,
124
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
float
* s,
125
complex<float>* U,
blas_int_t
ldu, complex<float>* V,
blas_int_t
ldv,
126
complex<float>* work,
blas_int_t
lwork,
float
* rwork,
127
blas_int_t
* iwork,
blas_int_t
* info );
128
129
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
130
complex<double>* A,
blas_int_t
lda,
double
vl,
double
vu,
131
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
double
* s,
132
complex<double>* U,
blas_int_t
ldu, complex<double>* V,
blas_int_t
ldv,
133
complex<double>* work,
blas_int_t
lwork,
double
* rwork,
134
blas_int_t
* iwork,
blas_int_t
* info );
136
//*************************************************************************************************
137
138
139
//*************************************************************************************************
213
inline
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
214
float
* A,
blas_int_t
lda,
float
vl,
float
vu,
215
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
float
* s,
216
float
* U,
blas_int_t
ldu,
float
* V,
blas_int_t
ldv,
217
float
* work,
blas_int_t
lwork,
blas_int_t
* iwork,
218
blas_int_t
* info )
219
{
220
#if defined(INTEL_MKL_VERSION) && (INTEL_MKL_VERSION >= 20170000)
221
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
222
#endif
223
224
++il;
225
++iu;
226
227
sgesvdx_( &jobu, &jobv, &range, &m, &n, A, &lda, &vl, &vu, &il, &iu, ns,
228
s, U, &ldu, V, &ldv, work, &lwork, iwork, info
229
#
if
!defined(INTEL_MKL_VERSION) || (INTEL_MKL_VERSION < 20170000)
230
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
231
#endif
232
);
233
}
234
//*************************************************************************************************
235
236
237
//*************************************************************************************************
311
inline
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
312
double
* A,
blas_int_t
lda,
double
vl,
double
vu,
313
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
double
* s,
314
double
* U,
blas_int_t
ldu,
double
* V,
blas_int_t
ldv,
315
double
* work,
blas_int_t
lwork,
blas_int_t
* iwork,
316
blas_int_t
* info )
317
{
318
#if defined(INTEL_MKL_VERSION) && (INTEL_MKL_VERSION >= 20170000)
319
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
320
#endif
321
322
++il;
323
++iu;
324
325
dgesvdx_( &jobu, &jobv, &range, &m, &n, A, &lda, &vl, &vu, &il, &iu, ns,
326
s, U, &ldu, V, &ldv, work, &lwork, iwork, info
327
#
if
!defined(INTEL_MKL_VERSION) || (INTEL_MKL_VERSION < 20170000)
328
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
329
#endif
330
);
331
}
332
//*************************************************************************************************
333
334
335
//*************************************************************************************************
410
inline
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
411
complex<float>* A,
blas_int_t
lda,
float
vl,
float
vu,
412
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
float
* s,
413
complex<float>* U,
blas_int_t
ldu, complex<float>* V,
blas_int_t
ldv,
414
complex<float>* work,
blas_int_t
lwork,
float
* rwork,
415
blas_int_t
* iwork,
blas_int_t
* info )
416
{
417
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
418
419
#if defined(INTEL_MKL_VERSION) && (INTEL_MKL_VERSION >= 20170000)
420
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
421
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
422
using
ET = MKL_Complex8;
423
#else
424
using
ET = float;
425
#endif
426
427
++il;
428
++iu;
429
430
cgesvdx_( &jobu, &jobv, &range, &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
431
&vl, &vu, &il, &iu, ns, s,
432
reinterpret_cast<
ET*
>
( U ), &ldu,
reinterpret_cast<
ET*
>
( V ), &ldv,
433
reinterpret_cast<
ET*
>
( work ), &lwork, rwork, iwork, info
434
#
if
!defined(INTEL_MKL_VERSION) || (INTEL_MKL_VERSION < 20170000)
435
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
436
#endif
437
);
438
}
439
//*************************************************************************************************
440
441
442
//*************************************************************************************************
517
inline
void
gesvdx
(
char
jobu,
char
jobv,
char
range,
blas_int_t
m,
blas_int_t
n,
518
complex<double>* A,
blas_int_t
lda,
double
vl,
double
vu,
519
blas_int_t
il,
blas_int_t
iu,
blas_int_t
* ns,
double
* s,
520
complex<double>* U,
blas_int_t
ldu, complex<double>* V,
blas_int_t
ldv,
521
complex<double>* work,
blas_int_t
lwork,
double
* rwork,
522
blas_int_t
* iwork,
blas_int_t
* info )
523
{
524
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
525
526
#if defined(INTEL_MKL_VERSION) && (INTEL_MKL_VERSION >= 20170000)
527
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
528
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
529
using
ET = MKL_Complex16;
530
#else
531
using
ET = double;
532
#endif
533
534
++il;
535
++iu;
536
537
zgesvdx_( &jobu, &jobv, &range, &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
538
&vl, &vu, &il, &iu, ns, s,
539
reinterpret_cast<
ET*
>
( U ), &ldu,
reinterpret_cast<
ET*
>
( V ), &ldv,
540
reinterpret_cast<
ET*
>
( work ), &lwork, rwork, iwork, info
541
#
if
!defined(INTEL_MKL_VERSION) || (INTEL_MKL_VERSION < 20170000)
542
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
543
#endif
544
);
545
}
546
//*************************************************************************************************
547
548
}
// namespace blaze
549
550
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::gesvdx
void gesvdx(char jobu, char jobv, char range, blas_int_t m, blas_int_t n, float *A, blas_int_t lda, float vl, float vu, blas_int_t il, blas_int_t iu, blas_int_t *ns, float *s, float *U, blas_int_t ldu, float *V, blas_int_t ldv, float *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t *info)
LAPACK kernel for the singular value decomposition (SVD) of the given dense general single precision ...
Definition
gesvdx.h:213
blaze::blas_int_t
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition
Types.h:64
BLAZE_STATIC_ASSERT
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition
StaticAssert.h:112
blaze::fortran_charlen_t
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition
Types.h:186
Types.h
Header file for basic BLAS type definitions.
Types.h
Header file for basic type definitions.
Generated by
1.18.0