Skip to content

Commit 11c01c5

Browse files
authored
Fix tag construction (#357)
1 parent 454f312 commit 11c01c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • DifferentiationInterface/ext/DifferentiationInterfaceForwardDiffExt

DifferentiationInterface/ext/DifferentiationInterfaceForwardDiffExt/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ choose_chunk(::AutoForwardDiff{nothing}, x) = Chunk(x)
22
choose_chunk(::AutoForwardDiff{C}, x) where {C} = Chunk{min(length(x), C)}()
33

44
tag_type(f, ::AutoForwardDiff{C,T}, x) where {C,T} = T
5-
tag_type(f, ::AutoForwardDiff{C,Nothing}, x) where {C} = Tag{typeof(f),eltype(x)}
5+
tag_type(f, ::AutoForwardDiff{C,Nothing}, x) where {C} = typeof(Tag(f, eltype(x)))
66

77
make_dual_similar(::Type{T}, x::Number, dx::Number) where {T} = Dual{T}(x, dx)
88
make_dual_similar(::Type{T}, x, dx) where {T} = similar(x, Dual{T,eltype(x),1})

0 commit comments

Comments
 (0)