ANN: SugarBLAS.jl

package
announcement

#1

SugarBLAS.jl lets you write BLAS functions in a more aesthetic form. This way anytime someone reads a BLAS call they don’t have to look up for the order of the positional arguments to understand what it does.

julia> macroexpand(:(@blas! Y += X))
:(Base.LinAlg.axpy!(1.0,X,Y))

julia> macroexpand(:(@blas! X = (a+c)*X))
:(scale!(a + c,X))

julia> macroexpand(:(SugarBLAS.@gemm! C -= alpha*A*B))
:(Base.LinAlg.BLAS.gemm!('N','N',-alpha,A,B,1.0,C))

The package only uses Base definitions so you can extend each function however you want.


#2

Looks cool! “Raw” blas is horrible, so I will certainly try this out.


#3

This should be in Base!


#4

I think it works just fine as a package. Simple and does the job well. I know it’s used internally in IterativeSolvers.jl. Nice work.