Bug Summary

File:build/include/omc/c/external_solvers/dgemm.c
Warning:line 190, column 2
Value stored to 'ncola' is never read

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1/* dgemm.f -- translated by f2c (version 20061008).
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#include "blaswrap.h"
15
16/* Subroutine */ int dgemm_f2c_dgemm(char *transa, char *transb, integer *m, integer *
17 n, integer *k, doublereal *alpha, doublereal *a, integer *lda,
18 doublereal *b, integer *ldb, doublereal *beta, doublereal *c__,
19 integer *ldc)
20{
21 /* System generated locals */
22 integer a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
23 i__3;
24
25 /* Local variables */
26 integer i__, j, l, info;
27 logical nota, notb;
28 doublereal temp;
29 integer ncola;
30 extern logical lsame_(char *, char *);
31 integer nrowa, nrowb;
32 extern /* Subroutine */ int xerbla_(char *, integer *);
33
34/* .. Scalar Arguments .. */
35/* .. */
36/* .. Array Arguments .. */
37/* .. */
38
39/* Purpose */
40/* ======= */
41
42/* DGEMM performs one of the matrix-matrix operations */
43
44/* C := alpha*op( A )*op( B ) + beta*C, */
45
46/* where op( X ) is one of */
47
48/* op( X ) = X or op( X ) = X', */
49
50/* alpha and beta are scalars, and A, B and C are matrices, with op( A ) */
51/* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. */
52
53/* Arguments */
54/* ========== */
55
56/* TRANSA - CHARACTER*1. */
57/* On entry, TRANSA specifies the form of op( A ) to be used in */
58/* the matrix multiplication as follows: */
59
60/* TRANSA = 'N' or 'n', op( A ) = A. */
61
62/* TRANSA = 'T' or 't', op( A ) = A'. */
63
64/* TRANSA = 'C' or 'c', op( A ) = A'. */
65
66/* Unchanged on exit. */
67
68/* TRANSB - CHARACTER*1. */
69/* On entry, TRANSB specifies the form of op( B ) to be used in */
70/* the matrix multiplication as follows: */
71
72/* TRANSB = 'N' or 'n', op( B ) = B. */
73
74/* TRANSB = 'T' or 't', op( B ) = B'. */
75
76/* TRANSB = 'C' or 'c', op( B ) = B'. */
77
78/* Unchanged on exit. */
79
80/* M - INTEGER. */
81/* On entry, M specifies the number of rows of the matrix */
82/* op( A ) and of the matrix C. M must be at least zero. */
83/* Unchanged on exit. */
84
85/* N - INTEGER. */
86/* On entry, N specifies the number of columns of the matrix */
87/* op( B ) and the number of columns of the matrix C. N must be */
88/* at least zero. */
89/* Unchanged on exit. */
90
91/* K - INTEGER. */
92/* On entry, K specifies the number of columns of the matrix */
93/* op( A ) and the number of rows of the matrix op( B ). K must */
94/* be at least zero. */
95/* Unchanged on exit. */
96
97/* ALPHA - DOUBLE PRECISION. */
98/* On entry, ALPHA specifies the scalar alpha. */
99/* Unchanged on exit. */
100
101/* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is */
102/* k when TRANSA = 'N' or 'n', and is m otherwise. */
103/* Before entry with TRANSA = 'N' or 'n', the leading m by k */
104/* part of the array A must contain the matrix A, otherwise */
105/* the leading k by m part of the array A must contain the */
106/* matrix A. */
107/* Unchanged on exit. */
108
109/* LDA - INTEGER. */
110/* On entry, LDA specifies the first dimension of A as declared */
111/* in the calling (sub) program. When TRANSA = 'N' or 'n' then */
112/* LDA must be at least lmax( 1, m ), otherwise LDA must be at */
113/* least lmax( 1, k ). */
114/* Unchanged on exit. */
115
116/* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is */
117/* n when TRANSB = 'N' or 'n', and is k otherwise. */
118/* Before entry with TRANSB = 'N' or 'n', the leading k by n */
119/* part of the array B must contain the matrix B, otherwise */
120/* the leading n by k part of the array B must contain the */
121/* matrix B. */
122/* Unchanged on exit. */
123
124/* LDB - INTEGER. */
125/* On entry, LDB specifies the first dimension of B as declared */
126/* in the calling (sub) program. When TRANSB = 'N' or 'n' then */
127/* LDB must be at least lmax( 1, k ), otherwise LDB must be at */
128/* least lmax( 1, n ). */
129/* Unchanged on exit. */
130
131/* BETA - DOUBLE PRECISION. */
132/* On entry, BETA specifies the scalar beta. When BETA is */
133/* supplied as zero then C need not be set on input. */
134/* Unchanged on exit. */
135
136/* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). */
137/* Before entry, the leading m by n part of the array C must */
138/* contain the matrix C, except when beta is zero, in which */
139/* case C need not be set on entry. */
140/* On exit, the array C is overwritten by the m by n matrix */
141/* ( alpha*op( A )*op( B ) + beta*C ). */
142
143/* LDC - INTEGER. */
144/* On entry, LDC specifies the first dimension of C as declared */
145/* in the calling (sub) program. LDC must be at least */
146/* lmax( 1, m ). */
147/* Unchanged on exit. */
148
149
150/* Level 3 Blas routine. */
151
152/* -- Written on 8-February-1989. */
153/* Jack Dongarra, Argonne National Laboratory. */
154/* Iain Duff, AERE Harwell. */
155/* Jeremy Du Croz, Numerical Algorithms Group Ltd. */
156/* Sven Hammarling, Numerical Algorithms Group Ltd. */
157
158
159/* .. External Functions .. */
160/* .. */
161/* .. External Subroutines .. */
162/* .. */
163/* .. Intrinsic Functions .. */
164/* .. */
165/* .. Local Scalars .. */
166/* .. */
167/* .. Parameters .. */
168/* .. */
169
170/* Set NOTA and NOTB as true if A and B respectively are not */
171/* transposed and set NROWA, NCOLA and NROWB as the number of rows */
172/* and columns of A and the number of rows of B respectively. */
173
174 /* Parameter adjustments */
175 a_dim1 = *lda;
176 a_offset = 1 + a_dim1;
177 a -= a_offset;
178 b_dim1 = *ldb;
179 b_offset = 1 + b_dim1;
180 b -= b_offset;
181 c_dim1 = *ldc;
182 c_offset = 1 + c_dim1;
183 c__ -= c_offset;
184
185 /* Function Body */
186 nota = lsame_(transa, "N");
187 notb = lsame_(transb, "N");
188 if (nota) {
189 nrowa = *m;
190 ncola = *k;
Value stored to 'ncola' is never read
191 } else {
192 nrowa = *k;
193 ncola = *m;
194 }
195 if (notb) {
196 nrowb = *k;
197 } else {
198 nrowb = *n;
199 }
200
201/* Test the input parameters. */
202
203 info = 0;
204 if (! nota && ! lsame_(transa, "C") && ! lsame_(
205 transa, "T")) {
206 info = 1;
207 } else if (! notb && ! lsame_(transb, "C") && !
208 lsame_(transb, "T")) {
209 info = 2;
210 } else if (*m < 0) {
211 info = 3;
212 } else if (*n < 0) {
213 info = 4;
214 } else if (*k < 0) {
215 info = 5;
216 } else if (*lda < lmax(1,nrowa)) {
217 info = 8;
218 } else if (*ldb < lmax(1,nrowb)) {
219 info = 10;
220 } else if (*ldc < lmax(1,*m)) {
221 info = 13;
222 }
223 if (info != 0) {
224 xerbla_("DGEMM ", &info);
225 return 0;
226 }
227
228/* Quick return if possible. */
229
230 if (*m == 0 || *n == 0 || (*alpha == 0. || *k == 0) && *beta == 1.) {
231 return 0;
232 }
233
234/* And if alpha.eq.zero. */
235
236 if (*alpha == 0.) {
237 if (*beta == 0.) {
238 i__1 = *n;
239 for (j = 1; j <= i__1; ++j) {
240 i__2 = *m;
241 for (i__ = 1; i__ <= i__2; ++i__) {
242 c__[i__ + j * c_dim1] = 0.;
243/* L10: */
244 }
245/* L20: */
246 }
247 } else {
248 i__1 = *n;
249 for (j = 1; j <= i__1; ++j) {
250 i__2 = *m;
251 for (i__ = 1; i__ <= i__2; ++i__) {
252 c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
253/* L30: */
254 }
255/* L40: */
256 }
257 }
258 return 0;
259 }
260
261/* Start the operations. */
262
263 if (notb) {
264 if (nota) {
265
266/* Form C := alpha*A*B + beta*C. */
267
268 i__1 = *n;
269 for (j = 1; j <= i__1; ++j) {
270 if (*beta == 0.) {
271 i__2 = *m;
272 for (i__ = 1; i__ <= i__2; ++i__) {
273 c__[i__ + j * c_dim1] = 0.;
274/* L50: */
275 }
276 } else if (*beta != 1.) {
277 i__2 = *m;
278 for (i__ = 1; i__ <= i__2; ++i__) {
279 c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
280/* L60: */
281 }
282 }
283 i__2 = *k;
284 for (l = 1; l <= i__2; ++l) {
285 if (b[l + j * b_dim1] != 0.) {
286 temp = *alpha * b[l + j * b_dim1];
287 i__3 = *m;
288 for (i__ = 1; i__ <= i__3; ++i__) {
289 c__[i__ + j * c_dim1] += temp * a[i__ + l *
290 a_dim1];
291/* L70: */
292 }
293 }
294/* L80: */
295 }
296/* L90: */
297 }
298 } else {
299
300/* Form C := alpha*A'*B + beta*C */
301
302 i__1 = *n;
303 for (j = 1; j <= i__1; ++j) {
304 i__2 = *m;
305 for (i__ = 1; i__ <= i__2; ++i__) {
306 temp = 0.;
307 i__3 = *k;
308 for (l = 1; l <= i__3; ++l) {
309 temp += a[l + i__ * a_dim1] * b[l + j * b_dim1];
310/* L100: */
311 }
312 if (*beta == 0.) {
313 c__[i__ + j * c_dim1] = *alpha * temp;
314 } else {
315 c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
316 i__ + j * c_dim1];
317 }
318/* L110: */
319 }
320/* L120: */
321 }
322 }
323 } else {
324 if (nota) {
325
326/* Form C := alpha*A*B' + beta*C */
327
328 i__1 = *n;
329 for (j = 1; j <= i__1; ++j) {
330 if (*beta == 0.) {
331 i__2 = *m;
332 for (i__ = 1; i__ <= i__2; ++i__) {
333 c__[i__ + j * c_dim1] = 0.;
334/* L130: */
335 }
336 } else if (*beta != 1.) {
337 i__2 = *m;
338 for (i__ = 1; i__ <= i__2; ++i__) {
339 c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
340/* L140: */
341 }
342 }
343 i__2 = *k;
344 for (l = 1; l <= i__2; ++l) {
345 if (b[j + l * b_dim1] != 0.) {
346 temp = *alpha * b[j + l * b_dim1];
347 i__3 = *m;
348 for (i__ = 1; i__ <= i__3; ++i__) {
349 c__[i__ + j * c_dim1] += temp * a[i__ + l *
350 a_dim1];
351/* L150: */
352 }
353 }
354/* L160: */
355 }
356/* L170: */
357 }
358 } else {
359
360/* Form C := alpha*A'*B' + beta*C */
361
362 i__1 = *n;
363 for (j = 1; j <= i__1; ++j) {
364 i__2 = *m;
365 for (i__ = 1; i__ <= i__2; ++i__) {
366 temp = 0.;
367 i__3 = *k;
368 for (l = 1; l <= i__3; ++l) {
369 temp += a[l + i__ * a_dim1] * b[j + l * b_dim1];
370/* L180: */
371 }
372 if (*beta == 0.) {
373 c__[i__ + j * c_dim1] = *alpha * temp;
374 } else {
375 c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
376 i__ + j * c_dim1];
377 }
378/* L190: */
379 }
380/* L200: */
381 }
382 }
383 }
384
385 return 0;
386
387/* End of DGEMM . */
388
389} /* dgemm_ */