Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Tag ForwardDiff v0.3.0 [https://github.com/JuliaDiff/ForwardDiff.jl] #7177

Merged
merged 1 commit into from
Dec 2, 2016

Conversation

jrevels
Copy link
Member

@jrevels jrevels commented Nov 30, 2016

This change breaks a couple of things in the v0.2.0 API in order to get rid of global state, reduce compile times, provide a totally non-allocating API, and support more array types. I've written an upgrade guide here, and have tried to ensure that using the old API throws depwarns when possible instead of straight up breaking code.

@ChrisRackauckas
Copy link
Member

When you say "totally non-allocating API", you mean there's a simpler solution to this issue?

JuliaDiff/ForwardDiff.jl#136

@jrevels
Copy link
Member Author

jrevels commented Dec 1, 2016

No - if your objective function mutates values, those values still need to be typed generically enough to allow for Dual numbers to work. Unfortunately, that's a fundamental limitation of operator-overloading AD.

What I meant is that it is now possible to call ForwardDiff's API functions in such a way that they do not allocate any additional memory on top of whatever the objective function allocates. In other words, if your objective function is non-allocating, calls to ForwardDiff function shouldn't need to allocate, as long you provide work buffers up-front via the AbstractConfig types.

@KristofferC
Copy link
Sponsor Member

No, if you want to use arbitrary preallocated structures in your function you still need to allocate them with the correct element type and pass them in yourself.

@KristofferC
Copy link
Sponsor Member

Well.. beaten by a second.

@ChrisRackauckas
Copy link
Member

Got it. Thanks.

@jrevels jrevels merged commit 4244c34 into JuliaLang:metadata-v2 Dec 2, 2016
@jrevels jrevels deleted the pull-request/1d7f5903 branch December 2, 2016 14:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants