Skip to content

Commit 2dae2f1

Browse files
Recurse adapt
Needs a test case to really know if this is right. Thinking of GPUArrays, you can't have a GPUArray of GPUArrays so it should be an Array of GPUArrays
1 parent 8f89f21 commit 2dae2f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vector_of_array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ end
143143
Base.convert(::Type{AbstractArray}, VA::AbstractVectorOfArray) = stack(VA.u)
144144

145145
function Adapt.adapt_structure(to, VA::AbstractVectorOfArray)
146-
Adapt.adapt(to, Array(VA))
146+
Adapt.adapt.(to, VA.u)
147147
end
148148

149149
function VectorOfArray(vec::AbstractVector{T}, ::NTuple{N}) where {T, N}

0 commit comments

Comments
 (0)