Skip to content

Commit 6d72fe2

Browse files
committed
fast case for tuple
1 parent 24e6710 commit 6d72fe2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/stage1/forward.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ function (::∂☆{N})(f::ATB{N, typeof(tuple)}, args::AbstractTangentBundle{N}.
257257
∂vararg{N}()(args...)
258258
end
259259

260+
function (::∂☆{N})(f::ATB{N, typeof(tuple)}, args::ZeroBundle{N}...) where {N}
261+
ZeroBundle{N}(map(primal, args)) # special fast case
262+
end
263+
260264
struct FwdMap{N, T<:AbstractTangentBundle{N}}
261265
f::T
262266
end

0 commit comments

Comments
 (0)