Thanks! ArrayViews does work with axpy!() and does help both with execution time and memory.
On Tue, May 5, 2015 at 7:33 PM, Patrick O'Leary <[email protected]> wrote: > On Tuesday, May 5, 2015 at 9:06:50 PM UTC-5, Christian Peel wrote: >> >> I have a question for the BLAS gurus: I can use the BLAS function >> B[:,lx] = axpy!(-mu, B[:,k], B[:,lx]) >> to accelerate the code >> B[:,lx] = B[:,lx] - mu * B[:,k] >> but what I wanted to do was simply >> axpy!(-mu, B[:,k], B[:,lx]) >> I guess that there is some pass-by-value problem that makes the in-place >> nature of axpy! not work on columns of a matrix. Any suggestions for >> improving this? See line 47 of >> https://github.com/christianpeel/LLLplus.jl/blob/master/src/lll.jl for >> the original code. >> > > The slice operation creates a temporary array, so the copy is mutated, > then thrown away. I'm not sure if ArrayViews (from ArrayViews.jl) will work > with axpy!(), but you might want to check. > -- [email protected]
