-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function to find the Differential type for a given primal type #106
Comments
Good point. Probably the most performance critical case is going to be constructing a differential for something like Vector{Float64}(undef, N) One obvious choice for the element type of the differential is It might be that we genuinely do need to do things like convert |
If rather than But yes, for the Float64 case, it might well be reasonable to convert to |
Makes more sense.
Agreed. Tbh this might even live in the realms of requiring user-intervention, as it's not clear to me that any particular AD system will have the information necessary to make this optimisation automatically. |
Yeah, one situation is if the user knows for example that in this case its never going to be mutated we don't need to allow the possibility that it could become But in the short term we can do the marginally sub-optimal but always correct thing. |
Exactly. Or if they happen to know that it's never going to become |
When declaring rules for constructors of parameteric types (e.g. Arrays)
one needs too know what the parameter type of the elements are.
We should define a helper for this.
Its probaly something like:
This is primarily for use for type parameters of zero arg constructors.
Rather than the general way to do it
The text was updated successfully, but these errors were encountered: