MCPcopy Create free account
hub / github.com/numpy/numpy / caxpy_

Function caxpy_

numpy/linalg/lapack_lite/f2c_blas.c:35–120  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

33static doublecomplex c_b1078 = {1.,0.};
34
35/* Subroutine */ int caxpy_(integer *n, complex *ca, complex *cx, integer *
36 incx, complex *cy, integer *incy)
37{
38 /* System generated locals */
39 integer i__1, i__2, i__3, i__4;
40 complex q__1, q__2;
41
42 /* Local variables */
43 static integer i__, ix, iy;
44 extern doublereal scabs1_(complex *);
45
46
47/*
48 Purpose
49 =======
50
51 CAXPY constant times a vector plus a vector.
52
53 Further Details
54 ===============
55
56 jack dongarra, linpack, 3/11/78.
57 modified 12/3/93, array(1) declarations changed to array(*)
58
59 =====================================================================
60*/
61
62 /* Parameter adjustments */
63 --cy;
64 --cx;
65
66 /* Function Body */
67 if (*n <= 0) {
68 return 0;
69 }
70 if (scabs1_(ca) == 0.f) {
71 return 0;
72 }
73 if (*incx == 1 && *incy == 1) {
74 goto L20;
75 }
76
77/*
78 code for unequal increments or equal increments
79 not equal to 1
80*/
81
82 ix = 1;
83 iy = 1;
84 if (*incx < 0) {
85 ix = (-(*n) + 1) * *incx + 1;
86 }
87 if (*incy < 0) {
88 iy = (-(*n) + 1) * *incy + 1;
89 }
90 i__1 = *n;
91 for (i__ = 1; i__ <= i__1; ++i__) {
92 i__2 = iy;

Callers 5

cgehrd_Function · 0.85
chetd2_Function · 0.85
clahr2_Function · 0.85
clatrd_Function · 0.85
clatrs_Function · 0.85

Calls 1

scabs1_Function · 0.85

Tested by

no test coverage detected