File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name = " DifferentiationInterface"
22uuid = " a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
33authors = [" Guillaume Dalle" , " Adrian Hill" ]
4- version = " 0.6.51 "
4+ version = " 0.6.52 "
55
66[deps ]
77ADTypes = " 47edcb42-4c32-4615-8424-f2b9edc5f35b"
Original file line number Diff line number Diff line change 6161 multibasis(a::AbstractArray, inds)
6262
6363Construct the sum of the `i`-th standard basis arrays in the vector space of `a` for all `i ∈ inds`.
64+
65+ !!! warning
66+ Does not work on GPU, since this is intended for sparse autodiff and SparseMatrixColorings.jl doesn't work on GPUs either.
6467"""
6568function multibasis (a:: AbstractArray{T} , inds) where {T}
6669 b = similar (a)
6770 fill! (b, zero (T))
6871 for i in inds
69- b .+ = OneElement (i, one (T), a )
72+ b[i] = one (T)
7073 end
7174 return ismutable_array (a) ? b : map (+ , zero (a), b)
7275end
You can’t perform that action at this time.
0 commit comments