Skip to content

Commit 4a63457

Browse files
add Tracker fix for recursivecopy!
1 parent 16dd578 commit 4a63457

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
4-
version = "2.0.0"
4+
version = "2.0.1"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/init.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@ function __init__()
1919

2020
Base.convert(::Type{<:CuArrays.CuArray},VA::AbstractVectorOfArray) = CuArrays.CuArray(VA)
2121
end
22+
23+
@require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin
24+
function recursivecopy!(b::AbstractArray{T,N},a::AbstractArray{T2,N}) where {T<:Tracker.TrackedArray,T2<:Tracker.TrackedArray,N}
25+
@inbounds for i in eachindex(a)
26+
b[i] = copy(a[i])
27+
end
28+
end
29+
end
2230
end

0 commit comments

Comments
 (0)