EpetraExt
Development
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
btf
pothen
izero.f
Go to the documentation of this file.
1
subroutine
izero
( n, x, incx )
2
3
c ==================================================================
4
c ==================================================================
5
c ==== izero -- initialize integer vector to zero ====
6
c ==================================================================
7
c ==================================================================
8
9
c purpose ... initializes integer vector to zero
10
11
c created ... mar. 8, 1985
12
c last modified ... apr. 19, 1985
13
14
c ==================================================================
15
16
c --------------
17
c ... parameters
18
c --------------
19
20
integer
n, incx
21
22
integer
x (*)
23
24
c -------------------
25
c ... local variables
26
c -------------------
27
28
integer
xaddr, i
29
30
c ==================================================================
31
32
if
( incx .eq. 1 )
then
33
34
c ----------------------------------
35
c ... unit increment (standard case)
36
c ----------------------------------
37
38
do
100 i = 1, n
39
x(i) = 0
40
100
continue
41
42
else
43
44
c ----------------------
45
c ... non-unit increment
46
c ----------------------
47
48
xaddr = 1
49
if
( incx .lt. 0 )
then
50
xaddr = (-n+1)*incx + 1
51
endif
52
53
do
200 i = 1, n
54
x(xaddr) = 0
55
xaddr = xaddr + incx
56
200
continue
57
58
endif
59
60
return
61
62
end
izero
subroutine izero(n, x, incx)
Definition:
izero.f:1
Generated on Fri Dec 20 2024 09:27:22 for EpetraExt by
1.8.5