GPUArrays.jl
GPUArrays.jl copied to clipboard
Indexing with arrays
This is with CuArrays own indexing disabled.
Strangely plain arrays seem to work, but not cuarrays.
julia> cu([1:5;])[[5,2,3]]
3-element CuArray{Float32,1}:
5.0
2.0
3.0
julia> cu([1:5;])[cu[5,2,3]]
ERROR: scalar getindex is disabled
Seems like the code in Base doesn't route us to the Base._unsafe_getindex! we overload. Was this not the case in CuArrays?
Yeah I'm pretty sure I got it working at some point.