LAPACK
3.9.0
LAPACK: Linear Algebra PACKage
dlat2s.f
Go to the documentation of this file.
1
*> \brief \b DLAT2S converts a double-precision triangular matrix to a single-precision triangular matrix.
2
*
3
* =========== DOCUMENTATION ===========
4
*
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
7
*
8
*> \htmlonly
9
*> Download DLAT2S + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlat2s.f">
11
*> [TGZ]</a>
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlat2s.f">
13
*> [ZIP]</a>
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlat2s.f">
15
*> [TXT]</a>
16
*> \endhtmlonly
17
*
18
* Definition:
19
* ===========
20
*
21
* SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
22
*
23
* .. Scalar Arguments ..
24
* CHARACTER UPLO
25
* INTEGER INFO, LDA, LDSA, N
26
* ..
27
* .. Array Arguments ..
28
* REAL SA( LDSA, * )
29
* DOUBLE PRECISION A( LDA, * )
30
* ..
31
*
32
*
33
*> \par Purpose:
34
* =============
35
*>
36
*> \verbatim
37
*>
38
*> DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE
39
*> PRECISION triangular matrix, A.
40
*>
41
*> RMAX is the overflow for the SINGLE PRECISION arithmetic
42
*> DLAS2S checks that all the entries of A are between -RMAX and
43
*> RMAX. If not the conversion is aborted and a flag is raised.
44
*>
45
*> This is an auxiliary routine so there is no argument checking.
46
*> \endverbatim
47
*
48
* Arguments:
49
* ==========
50
*
51
*> \param[in] UPLO
52
*> \verbatim
53
*> UPLO is CHARACTER*1
54
*> = 'U': A is upper triangular;
55
*> = 'L': A is lower triangular.
56
*> \endverbatim
57
*>
58
*> \param[in] N
59
*> \verbatim
60
*> N is INTEGER
61
*> The number of rows and columns of the matrix A. N >= 0.
62
*> \endverbatim
63
*>
64
*> \param[in] A
65
*> \verbatim
66
*> A is DOUBLE PRECISION array, dimension (LDA,N)
67
*> On entry, the N-by-N triangular coefficient matrix A.
68
*> \endverbatim
69
*>
70
*> \param[in] LDA
71
*> \verbatim
72
*> LDA is INTEGER
73
*> The leading dimension of the array A. LDA >= max(1,N).
74
*> \endverbatim
75
*>
76
*> \param[out] SA
77
*> \verbatim
78
*> SA is REAL array, dimension (LDSA,N)
79
*> Only the UPLO part of SA is referenced. On exit, if INFO=0,
80
*> the N-by-N coefficient matrix SA; if INFO>0, the content of
81
*> the UPLO part of SA is unspecified.
82
*> \endverbatim
83
*>
84
*> \param[in] LDSA
85
*> \verbatim
86
*> LDSA is INTEGER
87
*> The leading dimension of the array SA. LDSA >= max(1,M).
88
*> \endverbatim
89
*>
90
*> \param[out] INFO
91
*> \verbatim
92
*> INFO is INTEGER
93
*> = 0: successful exit.
94
*> = 1: an entry of the matrix A is greater than the SINGLE
95
*> PRECISION overflow threshold, in this case, the content
96
*> of the UPLO part of SA in exit is unspecified.
97
*> \endverbatim
98
*
99
* Authors:
100
* ========
101
*
102
*> \author Univ. of Tennessee
103
*> \author Univ. of California Berkeley
104
*> \author Univ. of Colorado Denver
105
*> \author NAG Ltd.
106
*
107
*> \date December 2016
108
*
109
*> \ingroup doubleOTHERauxiliary
110
*
111
* =====================================================================
112
SUBROUTINE
dlat2s
( UPLO, N, A, LDA, SA, LDSA, INFO )
113
*
114
* -- LAPACK auxiliary routine (version 3.7.0) --
115
* -- LAPACK is a software package provided by Univ. of Tennessee, --
116
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
117
* December 2016
118
*
119
* .. Scalar Arguments ..
120
CHARACTER
UPLO
121
INTEGER
INFO, LDA, LDSA, N
122
* ..
123
* .. Array Arguments ..
124
REAL
SA( LDSA, * )
125
DOUBLE PRECISION
A( LDA, * )
126
* ..
127
*
128
* =====================================================================
129
*
130
* .. Local Scalars ..
131
INTEGER
I, J
132
DOUBLE PRECISION
RMAX
133
LOGICAL
UPPER
134
* ..
135
* .. External Functions ..
136
REAL
SLAMCH
137
LOGICAL
LSAME
138
EXTERNAL
slamch, lsame
139
* ..
140
* .. Executable Statements ..
141
*
142
rmax = slamch(
'O'
)
143
upper = lsame( uplo,
'U'
)
144
IF
( upper )
THEN
145
DO
20 j = 1, n
146
DO
10 i = 1, j
147
IF
( ( a( i, j ).LT.-rmax ) .OR. ( a( i, j ).GT.rmax ) )
148
$
THEN
149
info = 1
150
GO TO
50
151
END IF
152
sa( i, j ) = a( i, j )
153
10
CONTINUE
154
20
CONTINUE
155
ELSE
156
DO
40 j = 1, n
157
DO
30 i = j, n
158
IF
( ( a( i, j ).LT.-rmax ) .OR. ( a( i, j ).GT.rmax ) )
159
$
THEN
160
info = 1
161
GO TO
50
162
END IF
163
sa( i, j ) = a( i, j )
164
30
CONTINUE
165
40
CONTINUE
166
END IF
167
50
CONTINUE
168
*
169
RETURN
170
*
171
* End of DLAT2S
172
*
173
END
dlat2s
subroutine dlat2s(UPLO, N, A, LDA, SA, LDSA, INFO)
DLAT2S converts a double-precision triangular matrix to a single-precision triangular matrix.
Definition:
dlat2s.f:113
SRC
dlat2s.f
Generated on Wed May 5 2021 15:10:40 for LAPACK by
1.8.16