Skip to content

Commit 0a42771

Browse files
authored
Add backend function for Adapt.WrappedArray (#428)
1 parent b9ed84e commit 0a42771

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/GPUArraysCore/src/GPUArraysCore.jl

+2
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,6 @@ Gets the GPUArrays back-end responsible for managing arrays of type `T`.
120120
backend(::Type) = error("This object is not a GPU array") # COV_EXCL_LINE
121121
backend(x) = backend(typeof(x))
122122

123+
backend(::Type{WA}) where WA<:WrappedArray = backend(parent(WA)) # WrappedArray from Adapt for Base wrappers.
124+
123125
end # module GPUArraysCore

0 commit comments

Comments
 (0)