GPUArrays.jl
GPUArrays.jl copied to clipboard
2-arg show for GPUArray
Replaces https://github.com/JuliaGPU/CUDA.jl/pull/1197 with a more generic version:
julia> using JLArrays
julia> (x=[1.0], y=[2f0 3f0]) # Arrays
(x = [1.0], y = Float32[2.0 3.0])
julia> map(jl, ans) # previously looked identical
(x = JLArray([1.0]), y = JLArray(Float32[2.0 3.0]))
This sort-of assumes typeof(A).name.name is a reasonable constructor.
Unlike https://github.com/JuliaGPU/CUDA.jl/pull/1197, this is going to print CuArray(Float32[2.0 3.0]) rather than shortening to cu([2.0 3.0]).