Skip to content

Fix wrong return type in set_bit in cuda kernel. - #37

Merged
hzhangxyz merged 1 commit into
mainfrom
dev/fix-type-in-cuda
Jun 16, 2025
Merged

Fix wrong return type in set_bit in cuda kernel.#37
hzhangxyz merged 1 commit into
mainfrom
dev/fix-type-in-cuda

Conversation

@hzhangxyz

Copy link
Copy Markdown
Member

Description

Fix wrong return type in set_bit in cuda kernel.

Checklist:

@hzhangxyz
hzhangxyz requested review from CuSO4Deposit and Copilot and removed request for Copilot June 16, 2025 09:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the return type of the CUDA kernel function set_bit from bool to void, ensuring that the function correctly reflects its behavior of modifying data in-place without returning a value.

  • Changes the signature of set_bit to return void.
  • Ensures that the bit-setting operation updates the data correctly without using a return value.
Comments suppressed due to low confidence (1)

qmb/_hamiltonian_cuda.cu:45

  • Changing the return type to void clarifies that the set_bit function is used solely for its side-effect. Ensure that any call sites expecting a bool return value are updated accordingly.
__device__ void set_bit(std::uint8_t* data, std::uint8_t index, bool value) {

@hzhangxyz hzhangxyz mentioned this pull request Jun 16, 2025
1 task
@hzhangxyz
hzhangxyz merged commit 4e70d66 into main Jun 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants