-
Notifications
You must be signed in to change notification settings - Fork 12
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
WIP Rust interface for bridgestan #102
WIP Rust interface for bridgestan #102
Conversation
I've changed the base branch just to make viewing the diff easier, it would obviously still be merged into |
TIL about For string encoding, I think you need to be in a really weird edge case to end up with a mangled error string. All of the "normal" Stan error messages should be plain ASCII, and I think any libraries we use in C++ would be the same. I'm personally happy to do the encoding for now and re-assess if we ever find a case it doesn't work in. |
I'm hoping that the internals on this function change soon, but for both the current implementation and the one I'm hoping to use at some point in the future the requirement is that the length is at least |
The reason I wanted This makes it possible to pass in the library directly (and not a reference at all), so that the model owns the library. |
@WardBrian I guess this got closed because the branch was deleted? |
Oh, yeah, forgot that would happen! this will need some rebasing anyway because of things like the constructor function names changing |
I just did, I can just put it into a new PR or someone reopens this one (I can't) |
I also cannot reopen this. I guess there’s no way to change the base after the base has been deleted |
This is based on #88 and @WardBrian's branch.
Depends on #98 and will need to be rebased when that is merged.
It is still not decided if this should live in nutpie or in bridgestan, either would be fine for me.
I made a couple of changes compared to Brians branch:
Borrow<StanLibrary>
, so that client code can decide what kind of reference should be used to store the Library (ie Rc, Arc, &lib or direct ownership). That avoids a whole range of headache when using this in multithreaded code.Model
is now Send and SyncSome open questions:
I'm not 100% sure about the handling of string/bytes data in the interface. It might be easier to return &CStr in a couple of places, and leave worrying about the encoding to users.
param_unconstrain: What lengths are allowed for theta? I'm assuming that include_tp, inclued_gq are both set to false right now...