root / man / man3 / HPL_idamax.3 @ 1
Historique | Voir | Annoter | Télécharger (1,22 ko)
1 |
.TH HPL_idamax 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions" |
---|---|
2 |
.SH NAME |
3 |
HPL_idamax \- 1st k s.t. |x_k| = max_i(|x_i|). |
4 |
.SH SYNOPSIS |
5 |
\fB\&#include "hpl.h"\fR |
6 |
|
7 |
\fB\&int\fR |
8 |
\fB\&HPL_idamax(\fR |
9 |
\fB\&const int\fR |
10 |
\fI\&N\fR, |
11 |
\fB\&const double *\fR |
12 |
\fI\&X\fR, |
13 |
\fB\&const int\fR |
14 |
\fI\&INCX\fR |
15 |
\fB\&);\fR |
16 |
.SH DESCRIPTION |
17 |
\fB\&HPL_idamax\fR |
18 |
returns the index in an n-vector x of the first element |
19 |
having maximum absolute value. |
20 |
.SH ARGUMENTS |
21 |
.TP 8 |
22 |
N (local input) const int |
23 |
On entry, N specifies the length of the vector x. N must be |
24 |
at least zero. |
25 |
.TP 8 |
26 |
X (local input) const double * |
27 |
On entry, X is an incremented array of dimension at least |
28 |
( 1 + ( n - 1 ) * abs( INCX ) ) that contains the vector x. |
29 |
.TP 8 |
30 |
INCX (local input) const int |
31 |
On entry, INCX specifies the increment for the elements of X. |
32 |
INCX must not be zero. |
33 |
.SH EXAMPLE |
34 |
\fI\&#include "hpl.h"\fR |
35 |
|
36 |
int main(int argc, char *argv[]) |
37 |
.br |
38 |
{ |
39 |
.br |
40 |
double x[3]; |
41 |
.br |
42 |
int imax; |
43 |
.br |
44 |
x[0] = 1.0; x[1] = 3.0; x[2] = 2.0; |
45 |
.br |
46 |
imax = HPL_idamax( 3, x, 1 ); |
47 |
.br |
48 |
printf("imax=%d\en", imax); |
49 |
.br |
50 |
exit(0); |
51 |
.br |
52 |
return(0); |
53 |
.br |
54 |
} |
55 |
.SH SEE ALSO |
56 |
.BR HPL_daxpy \ (3), |
57 |
.BR HPL_dcopy \ (3), |
58 |
.BR HPL_dscal \ (3), |
59 |
.BR HPL_dswap \ (3). |