Skip to content

Why is seeding ydual necessary? #740

Closed
@gdalle

Description

@gdalle

There are some lines in the code that I don't understand, essentially all the ones that show up here:
https://github.com/search?q=repo%3AJuliaDiff%2FForwardDiff.jl%20seed!(y&type=code

Why would we need to set the dual numbers inside ydual to a specific value, before overwriting them with f!(ydual, xdual)? Can we just get rid of these steps?

This is causing issues when y has non-bitstype elements, because they may not be initialized the first time that jacobian is called.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions