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

AIBECS F is quite slower (5x) than handmade F #10

Open
briochemc opened this issue May 14, 2019 · 1 comment
Open

AIBECS F is quite slower (5x) than handmade F #10

briochemc opened this issue May 14, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@briochemc
Copy link
Member

No description provided.

@briochemc briochemc added the enhancement New feature or request label May 29, 2019
@briochemc
Copy link
Member Author

briochemc commented Aug 1, 2019

Note to self: Actually it would be nice to be able to create a performant inplace F from the user input of sources and sinks. This might require some code transformation though, so I'm not sure how I would do this.

For example, the user could provide an expression for each term, like

  • uptake: -1 / τ * DIP^2 / (DIP + k) * (z ≤ zₑ)
  • remin: κ * POP
  • geores: (DIPgeo - DIP) / τgeo

and then AIBECS could build an inplace and fused-loop function

function G_DIP!(dDIP, DIP, POP, p)
   @unpack τ, k, zₑ, κ, DIPgeo, τgeo = p # unpack parameters
   dDIP .= @. -1 / τ * DIP^2 / (DIP + k) * (z  zₑ) + κ * POP + (DIPgeo - DIP) / τgeo
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
Projects
None yet
Development

No branches or pull requests

1 participant