Skip to content

Commit c868913

Browse files
Fix ReverseDiff downstream
1 parent 803d02e commit c868913

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
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 <[email protected]>"]
4-
version = "3.17.0"
4+
version = "3.18.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

ext/RecursiveArrayToolsReverseDiffExt.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ module RecursiveArrayToolsReverseDiffExt
33
using RecursiveArrayTools
44
using ReverseDiff
55
using Zygote: @adjoint
6+
using RecursiveArrayTools.ArrayInterface
67

78
function trackedarraycopyto!(dest, src)
89
for (i, slice) in zip(eachindex(dest.u), eachslice(src, dims = ndims(src)))
910
if dest.u[i] isa AbstractArray
10-
dest.u[i] = reshape(reduce(vcat, slice), size(dest.u[i]))
11-
else
11+
dest.u[i] = reshape(ArrayInterface.aos_to_soa(slice), size(dest.u[i]))
12+
elseif dest.u[i]
1213
trackedarraycopyto!(dest.u[i], slice)
1314
end
1415
end

0 commit comments

Comments
 (0)