HP MLIB User's Guide Vol. 1 7th Ed.

112 HP MLIB User’s Guide
SRAMP/DRAMP/IRAMP Generate linear ramp
Name SRAMP/DRAMP/IRAMP
Generate linear ramp
Purpose Given real or integer scalars a and h, these subprograms generate a linear
ramp function
x can be stored in a one-dimensional array or in either a row or a column of a
two-dimensional array.
Usage VECLIB:
INTEGER*4 n, incx
REAL*4 a, h, x(lenx)
CALL SRAMP(n, a, h, x, incx)
INTEGER*4 n, incx
REAL*8 a, h, x(lenx)
CALL DRAMP(n, a, h, x, incx)
INTEGER*4 n, incx, a, h, x(lenx)
CALL IRAMP(n, a, h, x, incx)
VECLIB8:
INTEGER*8 n, incx
REAL*4 a, h, x(lenx)
CALL SRAMP(n, a, h, x, incx)
INTEGER*8 n, incx
REAL*8 a, h, x(lenx)
CALL DRAMP(n, a, h, x, incx)
INTEGER*8 n, incx, a, h, x(lenx)
CALL IRAMP(n, a, h, x, incx)
Input n Number of elements of x to be generated.
a The scalar a.
h The scalar h.
incx Increment for the array x, incx 0. x is stored forward
in array x with increment |incx|; that is, x
i
is stored in
x((i1)×|incx|+1).
Use incx = 1 if the vector x is stored contiguously in
array x; that is, if x
i
is stored in x(i). Refer to “BLAS
x
i
ai1()h+= i 12 n.,, ,=,