-
Notifications
You must be signed in to change notification settings - Fork 8
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
Dynamic allocation of logging toggles #125
Conversation
Thanks! A few comments:
|
Thanks a lot for the comments! I just updated with the R_*alloc functions as suggested in the provided link. I made this bespoke implementation actually because I did not know if you wanted the full |
I made a new implementation with I modified the allocators in Concerning the error message. Isn't the current error message for Note, I am terrible at naming things, so do not hesitate to request changes or reorganizations. |
Hi @krivit,
I made this PoC implementation of the grow-able logging vectors you suggests in #123.
Currently it does the following:
difftime
,difftail
,diffhead
anddiffto
intoDiffVect
.DiffVect
are basically growable vectors with:content
a heap allocated array ofint
ssize
the current count of elementscapacity
available memory allocatedSEXP
I implemented only what is necessary here and not all the features of a true "vector".
The initial capacity of 100 for each is purely for testing purposes.
This implementation seems to work as I can run EpiModelHIV simulations with it.
Does this interest you? If so, what should I improve in this (very simple) PoC?