1 /*
2 * Copyright (c) 2011, Michael Lehn
3 *
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1) Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2) Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * 3) Neither the name of the FLENS development group nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 /* Based on
34 *
35 SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
36 $ LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
37 $ INFO )
38 *
39 * -- LAPACK routine (version 3.3.1) --
40 * -- LAPACK is a software package provided by Univ. of Tennessee, --
41 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
42 * -- April 2011 --
43 */
44
45 #ifndef FLENS_LAPACK_EIG_TRSNA_H
46 #define FLENS_LAPACK_EIG_TRSNA_H 1
47
48 #include <flens/matrixtypes/matrixtypes.h>
49 #include <flens/vectortypes/vectortypes.h>
50
51 namespace flens { namespace lapack {
52
53 namespace TRSNA {
54
55 enum Job {
56 EigenvaluesOnly = 'E', // = 'E': for eigenvalues only (S);
57 EigenvectorsOnly = 'V', // = 'V': for eigenvectors only (SEP);
58 Both = 'B' // = 'B': for both eigenvalues and
59 // eigenvectors (S and SEP).
60 };
61
62 enum HowMany {
63 All = 'A', // = 'A': compute condition numbers for all eigenpairs
64 Selected = 'S' // = 'S': compute condition numbers for selected
65 // eigenpairs specified by the array SELECT.
66 };
67 }
68
69 //== trsna =====================================================================
70 template <typename VSELECT, typename MT, typename MVL, typename MVR,
71 typename VS, typename VSEP, typename MM, typename M,
72 typename MWORK, typename VIWORK>
73 void
74 trsna(TRSNA::Job job,
75 TRSNA::HowMany howMany,
76 const DenseVector<VSELECT> &select,
77 const GeMatrix<MT> &T,
78 const GeMatrix<MVL> &VL,
79 const GeMatrix<MVR> &VR,
80 DenseVector<VS> &s,
81 DenseVector<VSEP> &sep,
82 const MM &mm,
83 M &m,
84 GeMatrix<MWORK> &work,
85 DenseVector<VIWORK> &iWork);
86
87 //-- forwarding ----------------------------------------------------------------
88 template <typename VSELECT, typename MT, typename MVL, typename MVR,
89 typename VS, typename VSEP, typename MM, typename M,
90 typename MWORK, typename VIWORK>
91 void
92 trsna(TRSNA::Job job,
93 TRSNA::HowMany howMany,
94 const VSELECT &select,
95 const MT &T,
96 const MVL &VL,
97 const MVR &VR,
98 VS &&s,
99 VSEP &&sep,
100 const MM &mm,
101 M &&m,
102 MWORK &&work,
103 VIWORK &&iWork);
104
105 } } // namespace lapack, flens
106
107 #endif // FLENS_LAPACK_EIG_TRSNA_H
2 * Copyright (c) 2011, Michael Lehn
3 *
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1) Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2) Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * 3) Neither the name of the FLENS development group nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 /* Based on
34 *
35 SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
36 $ LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
37 $ INFO )
38 *
39 * -- LAPACK routine (version 3.3.1) --
40 * -- LAPACK is a software package provided by Univ. of Tennessee, --
41 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
42 * -- April 2011 --
43 */
44
45 #ifndef FLENS_LAPACK_EIG_TRSNA_H
46 #define FLENS_LAPACK_EIG_TRSNA_H 1
47
48 #include <flens/matrixtypes/matrixtypes.h>
49 #include <flens/vectortypes/vectortypes.h>
50
51 namespace flens { namespace lapack {
52
53 namespace TRSNA {
54
55 enum Job {
56 EigenvaluesOnly = 'E', // = 'E': for eigenvalues only (S);
57 EigenvectorsOnly = 'V', // = 'V': for eigenvectors only (SEP);
58 Both = 'B' // = 'B': for both eigenvalues and
59 // eigenvectors (S and SEP).
60 };
61
62 enum HowMany {
63 All = 'A', // = 'A': compute condition numbers for all eigenpairs
64 Selected = 'S' // = 'S': compute condition numbers for selected
65 // eigenpairs specified by the array SELECT.
66 };
67 }
68
69 //== trsna =====================================================================
70 template <typename VSELECT, typename MT, typename MVL, typename MVR,
71 typename VS, typename VSEP, typename MM, typename M,
72 typename MWORK, typename VIWORK>
73 void
74 trsna(TRSNA::Job job,
75 TRSNA::HowMany howMany,
76 const DenseVector<VSELECT> &select,
77 const GeMatrix<MT> &T,
78 const GeMatrix<MVL> &VL,
79 const GeMatrix<MVR> &VR,
80 DenseVector<VS> &s,
81 DenseVector<VSEP> &sep,
82 const MM &mm,
83 M &m,
84 GeMatrix<MWORK> &work,
85 DenseVector<VIWORK> &iWork);
86
87 //-- forwarding ----------------------------------------------------------------
88 template <typename VSELECT, typename MT, typename MVL, typename MVR,
89 typename VS, typename VSEP, typename MM, typename M,
90 typename MWORK, typename VIWORK>
91 void
92 trsna(TRSNA::Job job,
93 TRSNA::HowMany howMany,
94 const VSELECT &select,
95 const MT &T,
96 const MVL &VL,
97 const MVR &VR,
98 VS &&s,
99 VSEP &&sep,
100 const MM &mm,
101 M &&m,
102 MWORK &&work,
103 VIWORK &&iWork);
104
105 } } // namespace lapack, flens
106
107 #endif // FLENS_LAPACK_EIG_TRSNA_H