@@ -439,20 +439,20 @@ function peakflops(n::Integer=2000; parallel::Bool=false)
439
439
parallel ? sum (pmap (peakflops, [ n for i in 1 : nworkers ()])) : (2 * Float64 (n)^ 3 / t)
440
440
end
441
441
442
- # BLAS-like in-place y=alpha*x +y function (see also the version in blas.jl
442
+ # BLAS-like in-place y = x*α +y function (see also the version in blas.jl
443
443
# for BlasFloat Arrays)
444
- function axpy! (alpha , x:: AbstractArray , y:: AbstractArray )
444
+ function axpy! (α , x:: AbstractArray , y:: AbstractArray )
445
445
n = length (x)
446
446
if n != length (y)
447
447
throw (DimensionMismatch (" x has length $n , but y has length $(length (y)) " ))
448
448
end
449
449
for i = 1 : n
450
- @inbounds y[i] += alpha * x[i]
450
+ @inbounds y[i] += x[i]* α
451
451
end
452
452
y
453
453
end
454
454
455
- function axpy! {Ti<:Integer,Tj<:Integer} (alpha , x:: AbstractArray , rx:: AbstractArray{Ti} , y:: AbstractArray , ry:: AbstractArray{Tj} )
455
+ function axpy! {Ti<:Integer,Tj<:Integer} (α , x:: AbstractArray , rx:: AbstractArray{Ti} , y:: AbstractArray , ry:: AbstractArray{Tj} )
456
456
if length (x) != length (y)
457
457
throw (DimensionMismatch (" x has length $(length (x)) , but y has length $(length (y)) " ))
458
458
elseif minimum (rx) < 1 || maximum (rx) > length (x)
@@ -463,7 +463,7 @@ function axpy!{Ti<:Integer,Tj<:Integer}(alpha, x::AbstractArray, rx::AbstractArr
463
463
throw (ArgumentError (" rx has length $(length (rx)) , but ry has length $(length (ry)) " ))
464
464
end
465
465
for i = 1 : length (rx)
466
- @inbounds y[ry[i]] += alpha * x[rx[i]]
466
+ @inbounds y[ry[i]] += x[rx[i]]* α
467
467
end
468
468
y
469
469
end
0 commit comments