Conversation
This reverts commit 04bee2b.
The header is broken. I prefer to do this rather than maintain a duplicate header
|
I like the way you handle cephes. but Remove C math function declarations should be in different PR that we can discuss and see. |
|
It fails with a We should include |
Can you show me the changes of this run? It look like static build errors. |
|
The full branch is https://github.com/Gold856/gtsam/commits/windows-static, with that run being from the commit before I removed the C math function declarations. It also has the /permissive- changes so it can build up to that point. |
|
I think we need to solve one problem of the time. clearly you want to try to solve the static compilation. |
|
I showed you my static build branch instead of this PR is because you'll only notice the difference in static builds, which are the target of this PR. The additional changes are just so that it doesn't fail on other unrelated stuff. Yes, this includes the /permissive- changes because static linking is broken in other ways, as I showed in that PR. I believe all the commits in this PR are both independent and small enough that they can both be reviewed independently and another PR is separate. The split would essentially be modifying the exports (to fix static linking) and removing the C math function declarations (to fix static linking.) That functionally doesn't really gain much, especially since removing C math function declarations shouldn't impact usage, as cephes is included by a header explicitly marked as internal. I think it makes more sense to keep it as part of one PR. |
|
What is cephes used for here? Only for Chi square right? If so, can we just replace the lib/inline it? |
|
I also have another suggestion. |
|
Yeah, it's only used for ChiSquaredInverse. This apparently isn't used anywhere except for testGncOptimizer? Someone else is going to have to clarify the purpose of this function existing, because I'd vote to just outright remove cephes and this function. As for inlining it, I tried to remove as much of cephes as possible, and got it down to 13 files: |
|
The I added Cephes since it was an easy and lightweight replacement and Luca Carlone was keen on having GncOptimizer working again (he spoke to me about this in person). There was no other implementation available and implementing the If @ProfFan or any of you want to take it up, please feel free. I spent weeks trying to implement it without much success (especially with the full unit testing etc). |
|
I'm not a big fan of cephes either, and would welcome a local implementation of Varun, is there a PR for that or a branch? |
|
Ah, it's used in |
|
better not changing the original files. |
For a local version of ChiSquaredInverse? I think I gave up and got rid of whatever hacky version I had (which was nowhere near completion). This was also almost 2 years ago. :( |
dellaert
left a comment
There was a problem hiding this comment.
LGTM - but I know not enough. Ready to merge then?
|
Go for it! |

Same fix I applied to METIS. Apparently the cephes header also contained declaration for C math functions? Removed those because we have those functions in the standard library.