ITADN

Scalar indexing of CuArray in lsqr

#354Closedoscarvanderheide 创建于 2023-11-13
When I run `lsqr` on `CuArray`s, the lines ``` for i = 1:n isfinite(x[i]) || error("Initial guess for x must be finite") end ``` result in poor performance due to scalar indexing. I replaced this with ``` if !(all(isfinite.(x))) error("Initial guess for x must be finite") end ``` but before I submit a PR I thought it would be better to file and issue and discuss potential implications of the proposed approach.
关闭于 2024-08-08 1 条评论