We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fc376f commit 15c77f8Copy full SHA for 15c77f8
src/host/abstractarray.jl
@@ -41,8 +41,10 @@ end
41
42
## convert to CPU (keeping wrapper type)
43
44
-Adapt.adapt_storage(::Type{<:Array}, xs::AbstractArray) = convert(Array, xs)
45
-convert_to_cpu(xs) = adapt(Array, xs)
+struct ToArray end
+
46
+Adapt.adapt_storage(::ToArray, xs::AbstractArray) = convert(Array, xs)
47
+convert_to_cpu(xs) = adapt(ToArray(), xs)
48
49
## showing
50
0 commit comments