SCOPY/DCOPY/ICOPY/CCOPY/CCOPYC/ZCOPY/ZCOPYC | Copy vector | ||
Input | n | Number of elements of vectors x and y to be used in the | |
|
| copy operation. If n ≤ 0, the subprograms do not | |
|
| reference x or y. |
|
| x | Array of length lenx = (n−1)⋅incx+1 containing the | |
|
| ||
|
| and ZCOPYC and in unconjugated form by the other | |
|
| subprograms. |
|
| incx | Increment for the array x: | |
|
| incx ≥ 0 | x is stored forward in array x; that is, |
|
|
| xi is stored in x((i−1)⋅incx+1). |
|
| incx < 0 | x is stored backward in array x; that |
|
|
| is, xi is stored in x((i−n)⋅incx+1). |
|
| Use incx = 1 if the vector x is stored contiguously in | |
|
| array x; that is, if xi is stored in x(i). Refer to “Notes” for | |
|
| use of incx = 0. Refer to “BLAS Indexing Conventions” | |
|
| in the introduction to this chapter. | |
| incy | Increment for the array y, incy ≠ 0: | |
|
| incy > 0 | y is stored forward in array y; that is, |
|
|
| yi is stored in y((i−1)⋅incy+1). |
|
| incy < 0 | y is stored backward in array y; that |
|
|
| is, yi is stored in y((i−n)⋅incy+1). |
|
| Use incy = 1 if the vector y is stored contiguously in | |
|
| array y; that is, if yi is stored in y(i). Refer to “BLAS | |
|
| Indexing Conventions” in the introduction to this | |
|
| chapter. |
|
Output | y | Array of length leny = (n−1)⋅incy+1 containing the | |
|
| ||
|
| y ← x. |
|
Notes | If incx = 0, then yi | = x(1) for all i. This can be used to initialize all elements of |
y to a constant. Refer to “Example 2” on page 83.
The result is unspecified if x and y overlap such that any element of x shares a memory location with any element of y.
82HP MLIB User’s Guide