/src/igraph/vendor/lapack/dlacpy.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* -- translated by f2c (version 20191129). |
2 | | You must link the resulting object file with libf2c: |
3 | | on Microsoft Windows system, link with libf2c.lib; |
4 | | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
5 | | or, if you install libf2c.a in a standard place, with -lf2c -lm |
6 | | -- in that order, at the end of the command line, as in |
7 | | cc *.o -lf2c -lm |
8 | | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
9 | | |
10 | | http://www.netlib.org/f2c/libf2c.zip |
11 | | */ |
12 | | |
13 | | #include "f2c.h" |
14 | | |
15 | | /* > \brief \b DLACPY copies all or part of one two-dimensional array to another. |
16 | | |
17 | | =========== DOCUMENTATION =========== |
18 | | |
19 | | Online html documentation available at |
20 | | http://www.netlib.org/lapack/explore-html/ |
21 | | |
22 | | > \htmlonly |
23 | | > Download DLACPY + dependencies |
24 | | > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacpy. |
25 | | f"> |
26 | | > [TGZ]</a> |
27 | | > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacpy. |
28 | | f"> |
29 | | > [ZIP]</a> |
30 | | > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacpy. |
31 | | f"> |
32 | | > [TXT]</a> |
33 | | > \endhtmlonly |
34 | | |
35 | | Definition: |
36 | | =========== |
37 | | |
38 | | SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB ) |
39 | | |
40 | | CHARACTER UPLO |
41 | | INTEGER LDA, LDB, M, N |
42 | | DOUBLE PRECISION A( LDA, * ), B( LDB, * ) |
43 | | |
44 | | |
45 | | > \par Purpose: |
46 | | ============= |
47 | | > |
48 | | > \verbatim |
49 | | > |
50 | | > DLACPY copies all or part of a two-dimensional matrix A to another |
51 | | > matrix B. |
52 | | > \endverbatim |
53 | | |
54 | | Arguments: |
55 | | ========== |
56 | | |
57 | | > \param[in] UPLO |
58 | | > \verbatim |
59 | | > UPLO is CHARACTER*1 |
60 | | > Specifies the part of the matrix A to be copied to B. |
61 | | > = 'U': Upper triangular part |
62 | | > = 'L': Lower triangular part |
63 | | > Otherwise: All of the matrix A |
64 | | > \endverbatim |
65 | | > |
66 | | > \param[in] M |
67 | | > \verbatim |
68 | | > M is INTEGER |
69 | | > The number of rows of the matrix A. M >= 0. |
70 | | > \endverbatim |
71 | | > |
72 | | > \param[in] N |
73 | | > \verbatim |
74 | | > N is INTEGER |
75 | | > The number of columns of the matrix A. N >= 0. |
76 | | > \endverbatim |
77 | | > |
78 | | > \param[in] A |
79 | | > \verbatim |
80 | | > A is DOUBLE PRECISION array, dimension (LDA,N) |
81 | | > The m by n matrix A. If UPLO = 'U', only the upper triangle |
82 | | > or trapezoid is accessed; if UPLO = 'L', only the lower |
83 | | > triangle or trapezoid is accessed. |
84 | | > \endverbatim |
85 | | > |
86 | | > \param[in] LDA |
87 | | > \verbatim |
88 | | > LDA is INTEGER |
89 | | > The leading dimension of the array A. LDA >= max(1,M). |
90 | | > \endverbatim |
91 | | > |
92 | | > \param[out] B |
93 | | > \verbatim |
94 | | > B is DOUBLE PRECISION array, dimension (LDB,N) |
95 | | > On exit, B = A in the locations specified by UPLO. |
96 | | > \endverbatim |
97 | | > |
98 | | > \param[in] LDB |
99 | | > \verbatim |
100 | | > LDB is INTEGER |
101 | | > The leading dimension of the array B. LDB >= max(1,M). |
102 | | > \endverbatim |
103 | | |
104 | | Authors: |
105 | | ======== |
106 | | |
107 | | > \author Univ. of Tennessee |
108 | | > \author Univ. of California Berkeley |
109 | | > \author Univ. of Colorado Denver |
110 | | > \author NAG Ltd. |
111 | | |
112 | | > \date September 2012 |
113 | | |
114 | | > \ingroup auxOTHERauxiliary |
115 | | |
116 | | ===================================================================== |
117 | | Subroutine */ int igraphdlacpy_(char *uplo, integer *m, integer *n, doublereal * |
118 | | a, integer *lda, doublereal *b, integer *ldb) |
119 | 0 | { |
120 | | /* System generated locals */ |
121 | 0 | integer a_dim1, a_offset, b_dim1, b_offset, i__1, i__2; |
122 | | |
123 | | /* Local variables */ |
124 | 0 | integer i__, j; |
125 | 0 | extern logical igraphlsame_(char *, char *); |
126 | | |
127 | | |
128 | | /* -- LAPACK auxiliary routine (version 3.4.2) -- |
129 | | -- LAPACK is a software package provided by Univ. of Tennessee, -- |
130 | | -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
131 | | September 2012 |
132 | | |
133 | | |
134 | | ===================================================================== |
135 | | |
136 | | |
137 | | Parameter adjustments */ |
138 | 0 | a_dim1 = *lda; |
139 | 0 | a_offset = 1 + a_dim1; |
140 | 0 | a -= a_offset; |
141 | 0 | b_dim1 = *ldb; |
142 | 0 | b_offset = 1 + b_dim1; |
143 | 0 | b -= b_offset; |
144 | | |
145 | | /* Function Body */ |
146 | 0 | if (igraphlsame_(uplo, "U")) { |
147 | 0 | i__1 = *n; |
148 | 0 | for (j = 1; j <= i__1; ++j) { |
149 | 0 | i__2 = min(j,*m); |
150 | 0 | for (i__ = 1; i__ <= i__2; ++i__) { |
151 | 0 | b[i__ + j * b_dim1] = a[i__ + j * a_dim1]; |
152 | | /* L10: */ |
153 | 0 | } |
154 | | /* L20: */ |
155 | 0 | } |
156 | 0 | } else if (igraphlsame_(uplo, "L")) { |
157 | 0 | i__1 = *n; |
158 | 0 | for (j = 1; j <= i__1; ++j) { |
159 | 0 | i__2 = *m; |
160 | 0 | for (i__ = j; i__ <= i__2; ++i__) { |
161 | 0 | b[i__ + j * b_dim1] = a[i__ + j * a_dim1]; |
162 | | /* L30: */ |
163 | 0 | } |
164 | | /* L40: */ |
165 | 0 | } |
166 | 0 | } else { |
167 | 0 | i__1 = *n; |
168 | 0 | for (j = 1; j <= i__1; ++j) { |
169 | 0 | i__2 = *m; |
170 | 0 | for (i__ = 1; i__ <= i__2; ++i__) { |
171 | 0 | b[i__ + j * b_dim1] = a[i__ + j * a_dim1]; |
172 | | /* L50: */ |
173 | 0 | } |
174 | | /* L60: */ |
175 | 0 | } |
176 | 0 | } |
177 | 0 | return 0; |
178 | | |
179 | | /* End of DLACPY */ |
180 | |
|
181 | 0 | } /* igraphdlacpy_ */ |
182 | | |