JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.84k stars 5.49k forks source link

Eliminate copies when returning from LAPACK wrappers #9116

Open andreasnoack opened 10 years ago

andreasnoack commented 10 years ago

Some of the wrapped LAPACK subroutines for eigenproblems support calculation of a subset of the spectrum and return an intereger of the number of eigenvalues calculated. Right now, the wrappers use this integer to return part of the array used by LAPACK. This creates a copy and we might want to avoid that in the LAPACK wrapper and wait until it is strictly necessary, e.g. in exported methods.

ViralBShah commented 5 years ago

I think we are largely ok on this now. Close?

andreasnoack commented 5 years ago

Still an issue in https://github.com/JuliaLang/julia/blob/21823899cc1724871a8e679287a94bb4acee72d7/stdlib/LinearAlgebra/src/lapack.jl#L5093