Skip to content

Add argument coercions - #3027

Merged
schweitzpgi merged 3 commits into
NVIDIA:mainfrom
schweitzpgi:ch-argument.coercion
Jun 11, 2025
Merged

schweitzpgi merged 3 commits into
NVIDIA:mainfrom
schweitzpgi:ch-argument.coercion

Conversation

@schweitzpgi

Copy link
Copy Markdown
Collaborator

clang++ already checks the semantics for us, so we just need to add coercions for arguments that appear to be of different types. This adds support for all integral -> integral and floating-point -> floating-point and pointer -> pointer coercions.

@schweitzpgi
schweitzpgi enabled auto-merge (squash) June 10, 2025 19:28
clang++ already checks the semantics for us, so we just need to add
coercions for arguments that appear to be of different types. This
adds support for all integral -> integral and floating-point ->
floating-point and pointer -> pointer coercions.

Add a test.

Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>
@schweitzpgi
schweitzpgi force-pushed the ch-argument.coercion branch from 13665da to 16695c1 Compare June 10, 2025 19:32
@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Jun 10, 2025
@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Jun 10, 2025
@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Jun 10, 2025

@sacpis sacpis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @schweitzpgi.

@schweitzpgi
schweitzpgi merged commit c5164fa into NVIDIA:main Jun 11, 2025
github-actions Bot pushed a commit that referenced this pull request Jun 11, 2025
@schweitzpgi
schweitzpgi deleted the ch-argument.coercion branch June 11, 2025 16:05
annagrin pushed a commit to annagrin/cuda-quantum that referenced this pull request Jun 17, 2025
* [C++ bridge] Add argument coercions.

clang++ already checks the semantics for us, so we just need to add
coercions for arguments that appear to be of different types. This
adds support for all integral -> integral and floating-point ->
floating-point and pointer -> pointer coercions.

Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>

* Add a test.

Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>

---------

Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
@bettinaheim bettinaheim changed the title [C++ bridge] Add argument coercions. Add argument coercions Jul 22, 2025
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 22, 2025
@bettinaheim bettinaheim added this to the release 0.12.0 milestone Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes Changes need to be captured in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants