Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/idamax.c

raw symbols SCIP
1 /* blas/idamax.f -- translated by f2c (version 20050501).
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 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/
17
18 /*< integer function idamax(n,dx,incx) >*/
19 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! idamax_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:179:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *dx, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *incx)
20 {
21 /* System generated locals */
22 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! ret_val, i__1;
23 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1;
24
25 /* Local variables */
26 integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, ix;
27 doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dmax__;
28
29
30 /* finds the index of element having max. absolute value. */
31 /* jack dongarra, linpack, 3/11/78. */
32 /* modified 3/93 to return if incx .le. 0. */
33 /* modified 12/3/93, array(1) declarations changed to array(*) */
34
35 /*< double precision dx(*),dmax >*/
36 /*< integer i,incx,ix,n >*/
37
38 /*< idamax = 0 >*/
39 /* Parameter adjustments */
40 --dx;
41
42 /* Function Body */
43 ret_val = 0;
44 /*< if( n.lt.1 .or. incx.le.0 ) return >*/
45 if (*n < 1 || *incx <= 0) {
46 return ret_val;
47 }
48 /*< idamax = 1 >*/
49 ret_val = 1;
50 /*< if(n.eq.1)return >*/
51 if (*n == 1) {
52 return ret_val;
53 }
54 /*< if(incx.eq.1)go to 20 >*/
55 if (*incx == 1) {
56 goto L20;
57 }
58
59 /* code for increment not equal to 1 */
60
61 /*< ix = 1 >*/
62 ix = 1;
63 /*< dmax = dabs(dx(1)) >*/
64 dmax__ = abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(dx[1]);
65 /*< ix = ix + incx >*/
66 ix += *incx;
67 /*< do 10 i = 2,n >*/
68 i__1 = *n;
69 for (i__ = 2; i__ <= i__1; ++i__) {
70 /*< if(dabs(dx(ix)).le.dmax) go to 5 >*/
71 if ((d__1 = dx[ix], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) <= dmax__) {
72 goto L5;
73 }
74 /*< idamax = i >*/
75 ret_val = i__;
76 /*< dmax = dabs(dx(ix)) >*/
77 dmax__ = (d__1 = dx[ix], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
78 /*< 5 ix = ix + incx >*/
79 L5:
80 ix += *incx;
81 /*< 10 continue >*/
82 /* L10: */
83 }
84 /*< return >*/
85 return ret_val;
86
87 /* code for increment equal to 1 */
88
89 /*< 20 dmax = dabs(dx(1)) >*/
90 L20:
91 dmax__ = abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(dx[1]);
92 /*< do 30 i = 2,n >*/
93 i__1 = *n;
94 for (i__ = 2; i__ <= i__1; ++i__) {
95 /*< if(dabs(dx(i)).le.dmax) go to 30 >*/
96 if ((d__1 = dx[i__], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) <= dmax__) {
97 goto L30;
98 }
99 /*< idamax = i >*/
100 ret_val = i__;
101 /*< dmax = dabs(dx(i)) >*/
102 dmax__ = (d__1 = dx[i__], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1));
103 /*< 30 continue >*/
104 L30:
105 ;
106 }
107 /*< return >*/
108 return ret_val;
109 /*< end >*/
110 } /* idamax_ */
111
112 #ifdef __cplusplus
113 }
114 #endif