Copy with CuArrays and `allowscalar(false)`

gpu

#1

Hi,

I am using CuArrays but the following operation seems unsupported:

using CuArrays
x=rand(10) |> cu;
CuArrays.allowscalar(false)
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.


#2

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


#3

Should I open an issue in CuArrays?


#4

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.