NVIDIA / NVIDIA/cuvs

[FEA] Reduce duplication between C++ and C APIs

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.