Copy with CuArrays and `allowscalar(false)`




I am using CuArrays but the following operation seems unsupported:

using CuArrays
x=rand(10) |> cu;
V[:,1] .= x;

It gives:

ERROR: scalar getindex is disabled

Using copy! from link is troublesome because a CuArray does not have ptr in its struct.

Is there a way around?

Thank you for your help.


That’s a bug, it should use the buf field. Probably not covered by the tests.


Should I open an issue in CuArrays?


Yeah. Adapting the code should be pretty easy though, just look at the preceding functions. I can have a look in a couple of days, better open an issue not to lose track though.