ergo
template_lapack_lasq2.h
Go to the documentation of this file.
1 /* Ergo, version 3.3, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2013 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Primary academic reference:
19  * Kohn−Sham Density Functional Theory Electronic Structure Calculations
20  * with Linearly Scaling Computational Time and Memory Usage,
21  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
22  * J. Chem. Theory Comput. 7, 340 (2011),
23  * <http://dx.doi.org/10.1021/ct100611z>
24  *
25  * For further information about Ergo, see <http://www.ergoscf.org>.
26  */
27 
28  /* This file belongs to the template_lapack part of the Ergo source
29  * code. The source files in the template_lapack directory are modified
30  * versions of files originally distributed as CLAPACK, see the
31  * Copyright/license notice in the file template_lapack/COPYING.
32  */
33 
34 
35 #ifndef TEMPLATE_LAPACK_LASQ2_HEADER
36 #define TEMPLATE_LAPACK_LASQ2_HEADER
37 
38 
39 #include "template_lapack_lasq3.h"
40 
41 
42 template<class Treal>
43 int template_lapack_lasq2(integer *n, Treal *z__, integer *info)
44 {
45  /* System generated locals */
46  integer i__1, i__2, i__3;
47  Treal d__1, d__2;
48 
49 
50  /* Local variables */
51  Treal d__, e, g;
52  integer k;
53  Treal s, t;
54  integer i0, i4, n0;
55  Treal dn;
56  integer pp;
57  Treal dn1, dn2, dee, eps, tau, tol;
58  integer ipn4;
59  Treal tol2;
60  logical ieee;
61  integer nbig;
62  Treal dmin__, emin, emax;
63  integer kmin, ndiv, iter;
64  Treal qmin, temp, qmax, zmax;
65  integer splt;
66  Treal dmin1, dmin2;
67  integer nfail;
68  Treal desig, trace, sigma;
69  integer iinfo, ttype;
70  Treal deemin;
71  integer iwhila, iwhilb;
72  Treal oldemn, safmin;
73 
74 
75 /* -- LAPACK routine (version 3.2) -- */
76 
77 /* -- Contributed by Osni Marques of the Lawrence Berkeley National -- */
78 /* -- Laboratory and Beresford Parlett of the Univ. of California at -- */
79 /* -- Berkeley -- */
80 /* -- November 2008 -- */
81 
82 /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
83 /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
84 
85 /* .. Scalar Arguments .. */
86 /* .. */
87 /* .. Array Arguments .. */
88 /* .. */
89 
90 /* Purpose */
91 /* ======= */
92 
93 /* DLASQ2 computes all the eigenvalues of the symmetric positive */
94 /* definite tridiagonal matrix associated with the qd array Z to high */
95 /* relative accuracy are computed to high relative accuracy, in the */
96 /* absence of denormalization, underflow and overflow. */
97 
98 /* To see the relation of Z to the tridiagonal matrix, let L be a */
99 /* unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and */
100 /* let U be an upper bidiagonal matrix with 1's above and diagonal */
101 /* Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the */
102 /* symmetric tridiagonal to which it is similar. */
103 
104 /* Note : DLASQ2 defines a logical variable, IEEE, which is true */
105 /* on machines which follow ieee-754 floating-point standard in their */
106 /* handling of infinities and NaNs, and false otherwise. This variable */
107 /* is passed to DLASQ3. */
108 
109 /* Arguments */
110 /* ========= */
111 
112 /* N (input) INTEGER */
113 /* The number of rows and columns in the matrix. N >= 0. */
114 
115 /* Z (input/output) DOUBLE PRECISION array, dimension ( 4*N ) */
116 /* On entry Z holds the qd array. On exit, entries 1 to N hold */
117 /* the eigenvalues in decreasing order, Z( 2*N+1 ) holds the */
118 /* trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If */
119 /* N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) */
120 /* holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of */
121 /* shifts that failed. */
122 
123 /* INFO (output) INTEGER */
124 /* = 0: successful exit */
125 /* < 0: if the i-th argument is a scalar and had an illegal */
126 /* value, then INFO = -i, if the i-th argument is an */
127 /* array and the j-entry had an illegal value, then */
128 /* INFO = -(i*100+j) */
129 /* > 0: the algorithm failed */
130 /* = 1, a split was marked by a positive value in E */
131 /* = 2, current block of Z not diagonalized after 30*N */
132 /* iterations (in inner while loop) */
133 /* = 3, termination criterion of outer while loop not met */
134 /* (program created more than N unreduced blocks) */
135 
136 /* Further Details */
137 /* =============== */
138 /* Local Variables: I0:N0 defines a current unreduced segment of Z. */
139 /* The shifts are accumulated in SIGMA. Iteration count is in ITER. */
140 /* Ping-pong is controlled by PP (alternates between 0 and 1). */
141 
142 /* ===================================================================== */
143 
144 /* .. Parameters .. */
145 /* .. */
146 /* .. Local Scalars .. */
147 /* .. */
148 /* .. External Subroutines .. */
149 /* .. */
150 /* .. External Functions .. */
151 /* .. */
152 /* .. Intrinsic Functions .. */
153 /* .. */
154 /* .. Executable Statements .. */
155 
156 /* Test the input arguments. */
157 /* (in case DLASQ2 is not called by DLASQ1) */
158 
159 /* Table of constant values */
160 
161  integer c__1 = 1;
162  integer c__2 = 2;
163  integer c__10 = 10;
164  integer c__3 = 3;
165  integer c__4 = 4;
166  integer c__11 = 11;
167 
168  /* Parameter adjustments */
169  --z__;
170 
171  /* Function Body */
172  *info = 0;
173  eps = template_lapack_lamch("Precision", (Treal)0);
174  safmin = template_lapack_lamch("Safe minimum", (Treal)0);
175  tol = eps * 100.;
176 /* Computing 2nd power */
177  d__1 = tol;
178  tol2 = d__1 * d__1;
179 
180  if (*n < 0) {
181  *info = -1;
182  template_blas_erbla("DLASQ2", &c__1);
183  return 0;
184  } else if (*n == 0) {
185  return 0;
186  } else if (*n == 1) {
187 
188 /* 1-by-1 case. */
189 
190  if (z__[1] < 0.) {
191  *info = -201;
192  template_blas_erbla("DLASQ2", &c__2);
193  }
194  return 0;
195  } else if (*n == 2) {
196 
197 /* 2-by-2 case. */
198 
199  if (z__[2] < 0. || z__[3] < 0.) {
200  *info = -2;
201  template_blas_erbla("DLASQ2", &c__2);
202  return 0;
203  } else if (z__[3] > z__[1]) {
204  d__ = z__[3];
205  z__[3] = z__[1];
206  z__[1] = d__;
207  }
208  z__[5] = z__[1] + z__[2] + z__[3];
209  if (z__[2] > z__[3] * tol2) {
210  t = (z__[1] - z__[3] + z__[2]) * .5;
211  s = z__[3] * (z__[2] / t);
212  if (s <= t) {
213  s = z__[3] * (z__[2] / (t * (template_blas_sqrt(s / t + 1.) + 1.)));
214  } else {
215  s = z__[3] * (z__[2] / (t + template_blas_sqrt(t) * template_blas_sqrt(t + s)));
216  }
217  t = z__[1] + (s + z__[2]);
218  z__[3] *= z__[1] / t;
219  z__[1] = t;
220  }
221  z__[2] = z__[3];
222  z__[6] = z__[2] + z__[1];
223  return 0;
224  }
225 
226 /* Check for negative data and compute sums of q's and e's. */
227 
228  z__[*n * 2] = 0.;
229  emin = z__[2];
230  qmax = 0.;
231  zmax = 0.;
232  d__ = 0.;
233  e = 0.;
234 
235  i__1 = ( *n - 1 ) << 1;
236  for (k = 1; k <= i__1; k += 2) {
237  if (z__[k] < 0.) {
238  *info = -(k + 200);
239  template_blas_erbla("DLASQ2", &c__2);
240  return 0;
241  } else if (z__[k + 1] < 0.) {
242  *info = -(k + 201);
243  template_blas_erbla("DLASQ2", &c__2);
244  return 0;
245  }
246  d__ += z__[k];
247  e += z__[k + 1];
248 /* Computing MAX */
249  d__1 = qmax, d__2 = z__[k];
250  qmax = maxMACRO(d__1,d__2);
251 /* Computing MIN */
252  d__1 = emin, d__2 = z__[k + 1];
253  emin = minMACRO(d__1,d__2);
254 /* Computing MAX */
255  d__1 = maxMACRO(qmax,zmax), d__2 = z__[k + 1];
256  zmax = maxMACRO(d__1,d__2);
257 /* L10: */
258  }
259  if (z__[(*n << 1) - 1] < 0.) {
260  *info = -((*n << 1) + 199);
261  template_blas_erbla("DLASQ2", &c__2);
262  return 0;
263  }
264  d__ += z__[(*n << 1) - 1];
265 /* Computing MAX */
266  d__1 = qmax, d__2 = z__[(*n << 1) - 1];
267  qmax = maxMACRO(d__1,d__2);
268  zmax = maxMACRO(qmax,zmax);
269 
270 /* Check for diagonality. */
271 
272  if (e == 0.) {
273  i__1 = *n;
274  for (k = 2; k <= i__1; ++k) {
275  z__[k] = z__[(k << 1) - 1];
276 /* L20: */
277  }
278  template_lapack_lasrt("D", n, &z__[1], &iinfo);
279  z__[(*n << 1) - 1] = d__;
280  return 0;
281  }
282 
283  trace = d__ + e;
284 
285 /* Check for zero data. */
286 
287  if (trace == 0.) {
288  z__[(*n << 1) - 1] = 0.;
289  return 0;
290  }
291 
292 /* Check whether the machine is IEEE conformable. */
293 
294  ieee = template_lapack_ilaenv(&c__10, "DLASQ2", "N", &c__1, &c__2, &c__3, &c__4, (ftnlen)6, (ftnlen)1) == 1 && template_lapack_ilaenv(&c__11, "DLASQ2", "N", &c__1, &c__2,
295  &c__3, &c__4, (ftnlen)6, (ftnlen)1) == 1;
296 
297 /* Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...). */
298 
299  for (k = *n << 1; k >= 2; k += -2) {
300  z__[k * 2] = 0.;
301  z__[(k << 1) - 1] = z__[k];
302  z__[(k << 1) - 2] = 0.;
303  z__[(k << 1) - 3] = z__[k - 1];
304 /* L30: */
305  }
306 
307  i0 = 1;
308  n0 = *n;
309 
310 /* Reverse the qd-array, if warranted. */
311 
312  if (z__[(i0 << 2) - 3] * 1.5 < z__[(n0 << 2) - 3]) {
313  ipn4 = ( i0 + n0 ) << 2;
314  i__1 = ( i0 + n0 - 1 ) << 1;
315  for (i4 = i0 << 2; i4 <= i__1; i4 += 4) {
316  temp = z__[i4 - 3];
317  z__[i4 - 3] = z__[ipn4 - i4 - 3];
318  z__[ipn4 - i4 - 3] = temp;
319  temp = z__[i4 - 1];
320  z__[i4 - 1] = z__[ipn4 - i4 - 5];
321  z__[ipn4 - i4 - 5] = temp;
322 /* L40: */
323  }
324  }
325 
326 /* Initial split checking via dqd and Li's test. */
327 
328  pp = 0;
329 
330  for (k = 1; k <= 2; ++k) {
331 
332  d__ = z__[(n0 << 2) + pp - 3];
333  i__1 = (i0 << 2) + pp;
334  for (i4 = ( ( n0 - 1 ) << 2) + pp; i4 >= i__1; i4 += -4) {
335  if (z__[i4 - 1] <= tol2 * d__) {
336  z__[i4 - 1] = -0.;
337  d__ = z__[i4 - 3];
338  } else {
339  d__ = z__[i4 - 3] * (d__ / (d__ + z__[i4 - 1]));
340  }
341 /* L50: */
342  }
343 
344 /* dqd maps Z to ZZ plus Li's test. */
345 
346  emin = z__[(i0 << 2) + pp + 1];
347  d__ = z__[(i0 << 2) + pp - 3];
348  i__1 = ( ( n0 - 1 ) << 2) + pp;
349  for (i4 = (i0 << 2) + pp; i4 <= i__1; i4 += 4) {
350  z__[i4 - (pp << 1) - 2] = d__ + z__[i4 - 1];
351  if (z__[i4 - 1] <= tol2 * d__) {
352  z__[i4 - 1] = -0.;
353  z__[i4 - (pp << 1) - 2] = d__;
354  z__[i4 - (pp << 1)] = 0.;
355  d__ = z__[i4 + 1];
356  } else if (safmin * z__[i4 + 1] < z__[i4 - (pp << 1) - 2] &&
357  safmin * z__[i4 - (pp << 1) - 2] < z__[i4 + 1]) {
358  temp = z__[i4 + 1] / z__[i4 - (pp << 1) - 2];
359  z__[i4 - (pp << 1)] = z__[i4 - 1] * temp;
360  d__ *= temp;
361  } else {
362  z__[i4 - (pp << 1)] = z__[i4 + 1] * (z__[i4 - 1] / z__[i4 - (
363  pp << 1) - 2]);
364  d__ = z__[i4 + 1] * (d__ / z__[i4 - (pp << 1) - 2]);
365  }
366 /* Computing MIN */
367  d__1 = emin, d__2 = z__[i4 - (pp << 1)];
368  emin = minMACRO(d__1,d__2);
369 /* L60: */
370  }
371  z__[(n0 << 2) - pp - 2] = d__;
372 
373 /* Now find qmax. */
374 
375  qmax = z__[(i0 << 2) - pp - 2];
376  i__1 = (n0 << 2) - pp - 2;
377  for (i4 = (i0 << 2) - pp + 2; i4 <= i__1; i4 += 4) {
378 /* Computing MAX */
379  d__1 = qmax, d__2 = z__[i4];
380  qmax = maxMACRO(d__1,d__2);
381 /* L70: */
382  }
383 
384 /* Prepare for the next iteration on K. */
385 
386  pp = 1 - pp;
387 /* L80: */
388  }
389 
390 /* Initialise variables to pass to DLASQ3. */
391 
392  ttype = 0;
393  dmin1 = 0.;
394  dmin2 = 0.;
395  dn = 0.;
396  dn1 = 0.;
397  dn2 = 0.;
398  g = 0.;
399  tau = 0.;
400 
401  iter = 2;
402  nfail = 0;
403  ndiv = ( n0 - i0 ) << 1;
404 
405  i__1 = *n + 1;
406  for (iwhila = 1; iwhila <= i__1; ++iwhila) {
407  if (n0 < 1) {
408  goto L170;
409  }
410 
411 /* While array unfinished do */
412 
413 /* E(N0) holds the value of SIGMA when submatrix in I0:N0 */
414 /* splits from the rest of the array, but is negated. */
415 
416  desig = 0.;
417  if (n0 == *n) {
418  sigma = 0.;
419  } else {
420  sigma = -z__[(n0 << 2) - 1];
421  }
422  if (sigma < 0.) {
423  *info = 1;
424  return 0;
425  }
426 
427 /* Find last unreduced submatrix's top index I0, find QMAX and */
428 /* EMIN. Find Gershgorin-type bound if Q's much greater than E's. */
429 
430  emax = 0.;
431  if (n0 > i0) {
432  emin = (d__1 = z__[(n0 << 2) - 5], absMACRO(d__1));
433  } else {
434  emin = 0.;
435  }
436  qmin = z__[(n0 << 2) - 3];
437  qmax = qmin;
438  for (i4 = n0 << 2; i4 >= 8; i4 += -4) {
439  if (z__[i4 - 5] <= 0.) {
440  goto L100;
441  }
442  if (qmin >= emax * 4.) {
443 /* Computing MIN */
444  d__1 = qmin, d__2 = z__[i4 - 3];
445  qmin = minMACRO(d__1,d__2);
446 /* Computing MAX */
447  d__1 = emax, d__2 = z__[i4 - 5];
448  emax = maxMACRO(d__1,d__2);
449  }
450 /* Computing MAX */
451  d__1 = qmax, d__2 = z__[i4 - 7] + z__[i4 - 5];
452  qmax = maxMACRO(d__1,d__2);
453 /* Computing MIN */
454  d__1 = emin, d__2 = z__[i4 - 5];
455  emin = minMACRO(d__1,d__2);
456 /* L90: */
457  }
458  i4 = 4;
459 
460 L100:
461  i0 = i4 / 4;
462  pp = 0;
463 
464  if (n0 - i0 > 1) {
465  dee = z__[(i0 << 2) - 3];
466  deemin = dee;
467  kmin = i0;
468  i__2 = (n0 << 2) - 3;
469  for (i4 = (i0 << 2) + 1; i4 <= i__2; i4 += 4) {
470  dee = z__[i4] * (dee / (dee + z__[i4 - 2]));
471  if (dee <= deemin) {
472  deemin = dee;
473  kmin = (i4 + 3) / 4;
474  }
475 /* L110: */
476  }
477  if ( ( kmin - i0 ) << 1 < n0 - kmin && deemin <= z__[(n0 << 2) - 3] *
478  .5) {
479  ipn4 = ( i0 + n0 ) << 2;
480  pp = 2;
481  i__2 = ( i0 + n0 - 1 ) << 1;
482  for (i4 = i0 << 2; i4 <= i__2; i4 += 4) {
483  temp = z__[i4 - 3];
484  z__[i4 - 3] = z__[ipn4 - i4 - 3];
485  z__[ipn4 - i4 - 3] = temp;
486  temp = z__[i4 - 2];
487  z__[i4 - 2] = z__[ipn4 - i4 - 2];
488  z__[ipn4 - i4 - 2] = temp;
489  temp = z__[i4 - 1];
490  z__[i4 - 1] = z__[ipn4 - i4 - 5];
491  z__[ipn4 - i4 - 5] = temp;
492  temp = z__[i4];
493  z__[i4] = z__[ipn4 - i4 - 4];
494  z__[ipn4 - i4 - 4] = temp;
495 /* L120: */
496  }
497  }
498  }
499 
500 /* Put -(initial shift) into DMIN. */
501 
502 /* Computing MAX */
503  d__1 = 0., d__2 = qmin - template_blas_sqrt(qmin) * 2. * template_blas_sqrt(emax);
504  dmin__ = -maxMACRO(d__1,d__2);
505 
506 /* Now I0:N0 is unreduced. */
507 /* PP = 0 for ping, PP = 1 for pong. */
508 /* PP = 2 indicates that flipping was applied to the Z array and */
509 /* and that the tests for deflation upon entry in DLASQ3 */
510 /* should not be performed. */
511 
512  nbig = (n0 - i0 + 1) * 30;
513  i__2 = nbig;
514  for (iwhilb = 1; iwhilb <= i__2; ++iwhilb) {
515  if (i0 > n0) {
516  goto L150;
517  }
518 
519 /* While submatrix unfinished take a good dqds step. */
520 
521  template_lapack_lasq3(&i0, &n0, &z__[1], &pp, &dmin__, &sigma, &desig, &qmax, &
522  nfail, &iter, &ndiv, &ieee, &ttype, &dmin1, &dmin2, &dn, &
523  dn1, &dn2, &g, &tau);
524 
525  pp = 1 - pp;
526 
527 /* When EMIN is very small check for splits. */
528 
529  if (pp == 0 && n0 - i0 >= 3) {
530  if (z__[n0 * 4] <= tol2 * qmax || z__[(n0 << 2) - 1] <= tol2 *
531  sigma) {
532  splt = i0 - 1;
533  qmax = z__[(i0 << 2) - 3];
534  emin = z__[(i0 << 2) - 1];
535  oldemn = z__[i0 * 4];
536  i__3 = ( n0 - 3 ) << 2;
537  for (i4 = i0 << 2; i4 <= i__3; i4 += 4) {
538  if (z__[i4] <= tol2 * z__[i4 - 3] || z__[i4 - 1] <=
539  tol2 * sigma) {
540  z__[i4 - 1] = -sigma;
541  splt = i4 / 4;
542  qmax = 0.;
543  emin = z__[i4 + 3];
544  oldemn = z__[i4 + 4];
545  } else {
546 /* Computing MAX */
547  d__1 = qmax, d__2 = z__[i4 + 1];
548  qmax = maxMACRO(d__1,d__2);
549 /* Computing MIN */
550  d__1 = emin, d__2 = z__[i4 - 1];
551  emin = minMACRO(d__1,d__2);
552 /* Computing MIN */
553  d__1 = oldemn, d__2 = z__[i4];
554  oldemn = minMACRO(d__1,d__2);
555  }
556 /* L130: */
557  }
558  z__[(n0 << 2) - 1] = emin;
559  z__[n0 * 4] = oldemn;
560  i0 = splt + 1;
561  }
562  }
563 
564 /* L140: */
565  }
566 
567  *info = 2;
568  return 0;
569 
570 /* end IWHILB */
571 
572 L150:
573 
574 /* L160: */
575  ;
576  }
577 
578  *info = 3;
579  return 0;
580 
581 /* end IWHILA */
582 
583 L170:
584 
585 /* Move q's to the front. */
586 
587  i__1 = *n;
588  for (k = 2; k <= i__1; ++k) {
589  z__[k] = z__[(k << 2) - 3];
590 /* L180: */
591  }
592 
593 /* Sort and compute sum of eigenvalues. */
594 
595  template_lapack_lasrt("D", n, &z__[1], &iinfo);
596 
597  e = 0.;
598  for (k = *n; k >= 1; --k) {
599  e += z__[k];
600 /* L190: */
601  }
602 
603 /* Store trace, sum(eigenvalues) and information on performance. */
604 
605  z__[(*n << 1) + 1] = trace;
606  z__[(*n << 1) + 2] = e;
607  z__[(*n << 1) + 3] = (Treal) iter;
608 /* Computing 2nd power */
609  i__1 = *n;
610  z__[(*n << 1) + 4] = (Treal) ndiv / (Treal) (i__1 * i__1);
611  z__[(*n << 1) + 5] = nfail * 100. / (Treal) iter;
612  return 0;
613 
614 /* End of DLASQ2 */
615 
616 } /* dlasq2_ */
617 
618 #endif
int template_lapack_lasq2(integer *n, Treal *z__, integer *info)
Definition: template_lapack_lasq2.h:43
#define absMACRO(x)
Definition: template_blas_common.h:45
int integer
Definition: template_blas_common.h:38
integer template_lapack_ilaenv(const integer *ispec, const char *name__, const char *opts, const integer *n1, const integer *n2, const integer *n3, const integer *n4, ftnlen name_len, ftnlen opts_len)
Definition: template_lapack_common.cc:279
#define maxMACRO(a, b)
Definition: template_blas_common.h:43
int template_lapack_lasrt(const char *id, const integer *n, Treal *d__, integer *info)
Definition: template_lapack_lasrt.h:40
#define minMACRO(a, b)
Definition: template_blas_common.h:44
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:144
int template_lapack_lasq3(integer *i0, integer *n0, Treal *z__, integer *pp, Treal *dmin__, Treal *sigma, Treal *desig, Treal *qmax, integer *nfail, integer *iter, integer *ndiv, logical *ieee, integer *ttype, Treal *dmin1, Treal *dmin2, Treal *dn, Treal *dn1, Treal *dn2, Treal *g, Treal *tau)
Definition: template_lapack_lasq3.h:45
Treal template_lapack_lamch(const char *cmach, Treal dummyReal)
Definition: template_lapack_lamch.h:199
bool logical
Definition: template_blas_common.h:39
int ftnlen
Definition: template_blas_common.h:40
Treal trace(const XYZ< Treal, MatrixGeneral< Treal, Tmatrix >, MatrixGeneral< Treal, Tmatrix > > &smm)
Definition: MatrixGeneral.h:902
Treal template_blas_sqrt(Treal x)