[FEA] Reduce duplication between C++ and C APIs
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
We have several C headers that are redefining enums and structs from the corresponding C++ files. This is quickly going to become a maintenance burden, and even worse it leaves us at risk of making updates to the C++ API constructs that don't propagate to the C constructs.
As an example, I consolitated the DistanceType enum into distance.h and simply import it into the C++ namespace in distance.hpp. We should do the same across all public APIs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading distance.h and distance.hpp, focusing on how DistanceType is defined in C and imported into the C++ namespace. Compare the remaining public C headers with their corresponding C++ files to identify duplicated enums and structs. Done means the public APIs share definitions without repeated declarations, with the existing DistanceType pattern applied consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100