Skip to content

Commit a22a1c3

Browse files
committed
Another GPU update
1 parent f4e2f8f commit a22a1c3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/testsuite/ad_utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function stabilize_eigvals!(D::AbstractVector)
4141
# rescale eigenvalues so that they lie on distinct radii in the complex plane
4242
# that are chosen randomly in non-overlapping intervals [k/n, (k+0.5)/n)] for k=1,...,n
4343
radii = ((1:n) .+ rand(real(eltype(D)), n) ./ 2) ./ n
44-
D .= sign.(D) .* radii[p]
44+
hD .= sign.(collect(D)) .* radii[p]
45+
copyto!(D, hD)
4546
return D
4647
end
4748
function make_eig_matrix(T, sz)

0 commit comments

Comments
 (0)