1 /*
2  *   Copyright (c) 2012, Michael Lehn, Klaus Pototzky
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 #ifndef CXXLAPACK_INTERFACE_LAGV2_TCC
34 #define CXXLAPACK_INTERFACE_LAGV2_TCC 1
35 
36 #include <iostream>
37 #include "xflens/cxxlapack/interface/interface.h"
38 #include "xflens/cxxlapack/netlib/netlib.h"
39 
40 namespace cxxlapack {
41 
42 template <typename IndexType>
43 void
lagv2(float A,IndexType ldA,float * B,IndexType ldB,float * alphar,float * alphai,float * beta,float & csl,float & snl,float & csr,float & snr)44 lagv2(float                 A,
45       IndexType             ldA,
46       float                 *B,
47       IndexType             ldB,
48       float                 *alphar,
49       float                 *alphai,
50       float                 *beta,
51       float                 &csl,
52       float                 &snl,
53       float                 &csr,
54       float                 &snr)
55 {
56     CXXLAPACK_DEBUG_OUT("slagv2");
57 
58     LAPACK_IMPL(slagv2)(A,
59                         &ldA,
60                         B,
61                         &ldB,
62                         alphar,
63                         alphai,
64                         beta,
65                         &csl,
66                         &snl,
67                         &csr,
68                         &snr);
69 
70 }
71 
72 template <typename IndexType>
73 void
lagv2(double A,IndexType ldA,double * B,IndexType ldB,double * alphar,double * alphai,double * beta,double & csl,double & snl,double & csr,double & snr)74 lagv2(double                A,
75       IndexType             ldA,
76       double                *B,
77       IndexType             ldB,
78       double                *alphar,
79       double                *alphai,
80       double                *beta,
81       double                &csl,
82       double                &snl,
83       double                &csr,
84       double                &snr)
85 {
86     CXXLAPACK_DEBUG_OUT("dlagv2");
87 
88     LAPACK_IMPL(dlagv2)(A,
89                         &ldA,
90                         B,
91                         &ldB,
92                         alphar,
93                         alphai,
94                         beta,
95                         &csl,
96                         &snl,
97                         &csr,
98                         &snr);
99 
100 }
101 
102 } // namespace cxxlapack
103 
104 #endif // CXXLAPACK_INTERFACE_LAGV2_TCC
105