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

Use oif_interface_ prefix for C implementations #731

Open
3 tasks
dmitry-kabanov opened this issue Jul 8, 2024 · 0 comments
Open
3 tasks

Use oif_interface_ prefix for C implementations #731

dmitry-kabanov opened this issue Jul 8, 2024 · 0 comments
Labels
enhancement New feature or request lang-C Everything related to the C programming language

Comments

@dmitry-kabanov
Copy link
Collaborator

Issue description:
There is a lack of "namespacing" in C implementations right now: precisely, functions are called the same way as they called, e. g., in Python. It would be better if all functions have prefixes oif_interface_ so that it would be clear in the implementation, which functions implement a given interface.

Also, on the implementation side the interfaces have this prefix, therefore, their inclusion into implementations is useless as then C compiler does not check conformance, actually.

TODOS:

  • Modify dispatch_c module so that each function invocation of a C implementation contains prefix oif_interface_ prepended to the method name passed as an argument to call_impl_method
  • Probably, C implementations should carry with them the information about what interface they implement: that is, interface name must be copied during implementation initialization
  • Modify existing C implementations such as c_qeq, c_lapack, and sundials_cvode so that the function names have this prefix
@dmitry-kabanov dmitry-kabanov added enhancement New feature or request lang-C Everything related to the C programming language labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lang-C Everything related to the C programming language
Projects
None yet
Development

No branches or pull requests

1 participant