Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
mndscal.cxx
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10/* dscal.f -- translated by f2c (version 20010320).
11 You must link the resulting object file with the libraries:
12 -lf2c -lm (in that order)
13*/
14
15namespace ROOT {
16
17namespace Minuit2 {
18
19int Mndscal(unsigned int n, double da, double *dx, int incx)
20{
21 /* System generated locals */
22 int i__1, i__2;
23
24 /* Local variables */
25 int i__, m, nincx, mp1;
26
27 /* scales a vector by a constant. */
28 /* uses unrolled loops for increment equal to one. */
29 /* jack dongarra, linpack, 3/11/78. */
30 /* modified 3/93 to return if incx .le. 0. */
31 /* modified 12/3/93, array(1) declarations changed to array(*) */
32
33 /* Parameter adjustments */
34 --dx;
35
36 /* Function Body */
37 if (n <= 0 || incx <= 0) {
38 return 0;
39 }
40 if (incx == 1) {
41 goto L20;
42 }
43
44 /* code for increment not equal to 1 */
45
46 nincx = n * incx;
47 i__1 = nincx;
48 i__2 = incx;
49 for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
50 dx[i__] = da * dx[i__];
51 /* L10: */
52 }
53 return 0;
54
55 /* code for increment equal to 1 */
56
57 /* clean-up loop */
58
59L20:
60 m = n % 5;
61 if (m == 0) {
62 goto L40;
63 }
64 i__2 = m;
65 for (i__ = 1; i__ <= i__2; ++i__) {
66 dx[i__] = da * dx[i__];
67 /* L30: */
68 }
69 if (n < 5) {
70 return 0;
71 }
72L40:
73 mp1 = m + 1;
74 i__2 = n;
75 for (i__ = mp1; i__ <= i__2; i__ += 5) {
76 dx[i__] = da * dx[i__];
77 dx[i__ + 1] = da * dx[i__ + 1];
78 dx[i__ + 2] = da * dx[i__ + 2];
79 dx[i__ + 3] = da * dx[i__ + 3];
80 dx[i__ + 4] = da * dx[i__ + 4];
81 /* L50: */
82 }
83 return 0;
84} /* dscal_ */
85
86} // namespace Minuit2
87
88} // namespace ROOT
const Int_t n
Definition legend1.C:16
int Mndscal(unsigned int, double, double *, int)
Definition mndscal.cxx:19
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
TMarker m
Definition textangle.C:8