JuliaGPU / GPUArrays.jl

Reusable array functionality for Julia's various GPU backends.
MIT License
321 stars 79 forks source link

add example to `@allowscalar` docstring #473

Closed Vilin97 closed 1 year ago

Vilin97 commented 1 year ago

I got a hard-to-find bug by doing @allowscalar x = a[1] and then having x undefined. My intuition about what the scope of @allowscalar ought to be is clearly different from what the scope actually is. This addition to the docstring should help.

maleadt commented 1 year ago

This is a bug; fixed in https://github.com/JuliaGPU/GPUArrays.jl/pull/474.