@@ -105,7 +105,8 @@ def vector_set(X, size_t i, double a):
105
105
Set i-th element.
106
106
vector_set(x, i, a)
107
107
"""
108
- cdef fff_vector * x , * y
108
+ cdef fff_vector * x
109
+ cdef fff_vector * y
109
110
x = fff_vector_fromPyArray (X )
110
111
y = fff_vector_new (x .size )
111
112
fff_vector_memcpy (y , x )
@@ -119,7 +120,8 @@ def vector_set_all(X, double a):
119
120
Set to a constant value.
120
121
vector_set_all(x, a)
121
122
"""
122
- cdef fff_vector * x , * y
123
+ cdef fff_vector * x
124
+ cdef fff_vector * y
123
125
x = fff_vector_fromPyArray (X )
124
126
y = fff_vector_new (x .size )
125
127
fff_vector_memcpy (y , x )
@@ -133,7 +135,8 @@ def vector_scale(X, double a):
133
135
Multiply by a constant value.
134
136
y = vector_scale(x, a)
135
137
"""
136
- cdef fff_vector * x , * y
138
+ cdef fff_vector * x
139
+ cdef fff_vector * y
137
140
x = fff_vector_fromPyArray (X )
138
141
y = fff_vector_new (x .size )
139
142
fff_vector_memcpy (y , x )
@@ -147,7 +150,8 @@ def vector_add_constant(X, double a):
147
150
Add a constant value.
148
151
y = vector_add_constant(x, a)
149
152
"""
150
- cdef fff_vector * x , * y
153
+ cdef fff_vector * x
154
+ cdef fff_vector * y
151
155
x = fff_vector_fromPyArray (X )
152
156
y = fff_vector_new (x .size )
153
157
fff_vector_memcpy (y , x )
@@ -161,7 +165,9 @@ def vector_add(X, Y):
161
165
Add two vectors.
162
166
z = vector_add(x, y)
163
167
"""
164
- cdef fff_vector * x , * y , * z
168
+ cdef fff_vector * x
169
+ cdef fff_vector * y
170
+ cdef fff_vector * z
165
171
x = fff_vector_fromPyArray (X )
166
172
y = fff_vector_fromPyArray (Y )
167
173
z = fff_vector_new (x .size )
@@ -177,7 +183,9 @@ def vector_sub(X, Y):
177
183
Subtract two vectors: x - y
178
184
z = vector_sub(x, y)
179
185
"""
180
- cdef fff_vector * x , * y , * z
186
+ cdef fff_vector * x
187
+ cdef fff_vector * y
188
+ cdef fff_vector * z
181
189
x = fff_vector_fromPyArray (X )
182
190
y = fff_vector_fromPyArray (Y )
183
191
z = fff_vector_new (x .size )
@@ -193,7 +201,9 @@ def vector_mul(X, Y):
193
201
Element-wise multiplication.
194
202
z = vector_mul(x, y)
195
203
"""
196
- cdef fff_vector * x , * y , * z
204
+ cdef fff_vector * x
205
+ cdef fff_vector * y
206
+ cdef fff_vector * z
197
207
x = fff_vector_fromPyArray (X )
198
208
y = fff_vector_fromPyArray (Y )
199
209
z = fff_vector_new (x .size )
@@ -209,7 +219,9 @@ def vector_div(X, Y):
209
219
Element-wise division.
210
220
z = vector_div(x, y)
211
221
"""
212
- cdef fff_vector * x , * y , * z
222
+ cdef fff_vector * x
223
+ cdef fff_vector * y
224
+ cdef fff_vector * z
213
225
x = fff_vector_fromPyArray (X )
214
226
y = fff_vector_fromPyArray (Y )
215
227
z = fff_vector_new (x .size )
@@ -300,7 +312,8 @@ def matrix_transpose(A):
300
312
Transpose a matrix.
301
313
B = matrix_transpose(A)
302
314
"""
303
- cdef fff_matrix * a , * b
315
+ cdef fff_matrix * a
316
+ cdef fff_matrix * b
304
317
a = fff_matrix_fromPyArray (A )
305
318
b = fff_matrix_new (a .size2 , a .size1 )
306
319
fff_matrix_transpose (b , a )
@@ -312,7 +325,9 @@ def matrix_add(A, B):
312
325
"""
313
326
C = matrix_add(A, B)
314
327
"""
315
- cdef fff_matrix * a , * b , * c
328
+ cdef fff_matrix * a
329
+ cdef fff_matrix * b
330
+ cdef fff_matrix * c
316
331
a = fff_matrix_fromPyArray (A )
317
332
b = fff_matrix_fromPyArray (B )
318
333
c = fff_matrix_new (a .size1 , a .size2 )
@@ -368,13 +383,16 @@ def blas_dasum(X):
368
383
return fff_blas_dasum (x )
369
384
370
385
def blas_ddot (X , Y ):
371
- cdef fff_vector * x , * y
386
+ cdef fff_vector * x
387
+ cdef fff_vector * y
372
388
x = fff_vector_fromPyArray (X )
373
389
y = fff_vector_fromPyArray (Y )
374
390
return fff_blas_ddot (x , y )
375
391
376
392
def blas_daxpy (double alpha , X , Y ):
377
- cdef fff_vector * x , * y , * z
393
+ cdef fff_vector * x
394
+ cdef fff_vector * y
395
+ cdef fff_vector * z
378
396
x = fff_vector_fromPyArray (X )
379
397
y = fff_vector_fromPyArray (Y )
380
398
z = fff_vector_new (y .size )
@@ -384,7 +402,8 @@ def blas_daxpy(double alpha, X, Y):
384
402
return Z
385
403
386
404
def blas_dscal (double alpha , X ):
387
- cdef fff_vector * x , * y
405
+ cdef fff_vector * x
406
+ cdef fff_vector * y
388
407
x = fff_vector_fromPyArray (X )
389
408
y = fff_vector_new (x .size )
390
409
fff_vector_memcpy (y , x )
@@ -403,7 +422,10 @@ def blas_dgemm(int TransA, int TransB, double alpha, A, B, double beta, C):
403
422
beta C where op(A) = A, A^T, A^H for TransA = CblasNoTrans,
404
423
CblasTrans, CblasConjTrans and similarly for the parameter TransB.
405
424
"""
406
- cdef fff_matrix * a , * b , * c , * d
425
+ cdef fff_matrix * a
426
+ cdef fff_matrix * b
427
+ cdef fff_matrix * c
428
+ cdef fff_matrix * d
407
429
a = fff_matrix_fromPyArray (A )
408
430
b = fff_matrix_fromPyArray (B )
409
431
c = fff_matrix_fromPyArray (C )
@@ -428,7 +450,10 @@ def blas_dsymm(int Side, int Uplo, double alpha, A, B, beta, C):
428
450
when Uplo is CblasLower then the lower triangle and diagonal of A
429
451
are used.
430
452
"""
431
- cdef fff_matrix * a , * b , * c , * d
453
+ cdef fff_matrix * a
454
+ cdef fff_matrix * b
455
+ cdef fff_matrix * c
456
+ cdef fff_matrix * d
432
457
a = fff_matrix_fromPyArray (A )
433
458
b = fff_matrix_fromPyArray (B )
434
459
c = fff_matrix_fromPyArray (C )
@@ -455,7 +480,9 @@ def blas_dtrmm(int Side, int Uplo, int TransA, int Diag, double alpha, A, B):
455
480
diagonal elements of the matrix A are taken as unity and are not
456
481
referenced.
457
482
"""
458
- cdef fff_matrix * a , * b , * c
483
+ cdef fff_matrix * a
484
+ cdef fff_matrix * b
485
+ cdef fff_matrix * c
459
486
a = fff_matrix_fromPyArray (A )
460
487
b = fff_matrix_fromPyArray (B )
461
488
c = fff_matrix_new (a .size1 , a .size2 )
@@ -482,7 +509,9 @@ def blas_dtrsm(int Side, int Uplo, int TransA, int Diag, double alpha, A, B):
482
509
CblasUnit then the diagonal elements of the matrix A are taken as
483
510
unity and are not referenced.
484
511
"""
485
- cdef fff_matrix * a , * b , * c
512
+ cdef fff_matrix * a
513
+ cdef fff_matrix * b
514
+ cdef fff_matrix * c
486
515
a = fff_matrix_fromPyArray (A )
487
516
b = fff_matrix_fromPyArray (B )
488
517
c = fff_matrix_new (a .size1 , a .size2 )
@@ -507,7 +536,9 @@ def blas_dsyrk(int Uplo, int Trans, double alpha, A, double beta, C):
507
536
when Uplo is CblasLower then the lower triangle and diagonal of C
508
537
are used.
509
538
"""
510
- cdef fff_matrix * a , * c , * d
539
+ cdef fff_matrix * a
540
+ cdef fff_matrix * c
541
+ cdef fff_matrix * d
511
542
a = fff_matrix_fromPyArray (A )
512
543
c = fff_matrix_fromPyArray (C )
513
544
d = fff_matrix_new (a .size1 , a .size2 )
@@ -529,7 +560,10 @@ def blas_dsyr2k(int Uplo, int Trans, double alpha, A, B, double beta, C):
529
560
and when Uplo is CblasLower then the lower triangle and diagonal of C
530
561
are used.
531
562
"""
532
- cdef fff_matrix * a , * b , * c , * d
563
+ cdef fff_matrix * a
564
+ cdef fff_matrix * b
565
+ cdef fff_matrix * c
566
+ cdef fff_matrix * d
533
567
a = fff_matrix_fromPyArray (A )
534
568
b = fff_matrix_fromPyArray (B )
535
569
c = fff_matrix_fromPyArray (C )
0 commit comments