ArrayFire.jl
ArrayFire.jl copied to clipboard
Feature Request: Extend Base.LinAlg functions
For numerical linear algebra it would be very useful to extend the implementations of Base.LinAlg.scale!
and Base.LinAlg.axpy!
etc. Right now, everything goes back to the implementation for AbstractArrays (which is terribly slow).
What I'm looking for is, for example:
using ArrayFire
using Base.Test
a = map(Float32,randn(128,128,128));
ad = AFArray(a)
t1d = Array( Base.LinAlg.axpy!(Float32(1.2),ad,ad) )
t1 = Base.LinAlg.axpy!(Float32(1.2),a ,a )
t2d = Array( Base.LinAlg.scale!(ad,Float32(2.3)))
t2 = Base.LinAlg.scale!(a, Float32,2.3))
@test_approx_eq t1 t1d
@test_approx_eq t2 t2d