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

Is there a way to know how many times a function defined as Macro is called ? #32

Closed
rohith14 opened this issue Oct 10, 2017 · 3 comments

Comments

@rohith14
Copy link

f = @ode_def LotkaVolterra begin
dx = ax - bxy
dy = -c
y + dxy
end a=>1.5 b=>1 c=3 d=1

If my solver calls this function, is there a way to see how many times 'f' is called ?

Thanks

@ChrisRackauckas
Copy link
Member

No there is not. It's a planned feature though (SciML/DiffEqBase.jl#54). If you instead use a regular function you can make it a call-overloaded type with an internal counter.

@rohith14
Copy link
Author

Thank you, Chris. That worked

@ChrisRackauckas
Copy link
Member

For the more general case, closing this as a duplicate of SciML/DiffEqBase.jl#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants