Skip to content
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

Change make_function to allow for multiple vector input arguments #39

Open
brianguenter opened this issue Aug 8, 2023 · 4 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brianguenter
Copy link
Owner

make_function allows you to do this

make_function(f,x,y,z) where x,y,z are vectors of input vectors. But the runtime generated function returned by make_function expects a single vector argument which is the concatenation of x,y,z. 

This would make using the runtime generated functions simpler when there are multiple input vectors.
@brianguenter brianguenter added enhancement New feature or request good first issue Good for newcomers labels Aug 8, 2023
@gdalle
Copy link
Contributor

gdalle commented Mar 17, 2024

This would also be nice for vector-jacobian and jacobian-vector products in terms of efficiency.
I ran into this with DifferentiationInterface.jl: whenever I want to call the generated function for a JVP, I have to feed it vcat(x, v), which leads to an allocation

@gdalle
Copy link
Contributor

gdalle commented Apr 1, 2024

@brianguenter
Copy link
Owner Author

brianguenter commented Apr 2, 2024

@gdalle do you really want x,y,z to each be a vector of vectors? Or do you want each of them to be a vector of scalar input values?

@gdalle
Copy link
Contributor

gdalle commented Apr 2, 2024

My bad, each being a vector of numbers is fine. Matrices would be ideal but I can handle the flattening on my end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants