-
Notifications
You must be signed in to change notification settings - Fork 118
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
Initial support for C wrappers #56
Initial support for C wrappers #56
Conversation
|
Signed-off-by: Scott Wilson <[email protected]>
src/CImath/chalf.cpp
Outdated
imath_half imath_half_createFromFloat (float f) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this not use the C++ version (casting on the way out or forcing a type pun)? It seems to me that we want to wrap the C++ functionality rather than repeat it. It's going to be much harder to maintain multiple copies of the same code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. I want to try to balance speed with maintainability, so the plan was to reimplement some things where they were trivial. However, if we want to go the type punning route, then I can go for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest that the test program be C, not C++. Otherwise we aren't really verifying that it compiles and runs properly in a pure C context.
That's a good point. I'll see what Anders did in oiio. |
Signed-off-by: Scott Wilson <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Closing this PR, as the plans for Rust have progressed separately. |
Description
This is the intial C wrapper/reimplementation of Imath (where it makes sense). The general idea for this project is to create a C and eventually a Rust wrapper. At the moment, this is a minimal commit to start a discussion about how best to implement this, maintaining the C bindings, etc.
The current goals
Reference C wrappers
Todo