Skip to content

Fix signed/unsigned mismatch in DpcProcessor::ComputeResultImages#23

Draft
Copilot wants to merge 3 commits intoissue19_conanfrom
copilot/sub-pr-21-again
Draft

Fix signed/unsigned mismatch in DpcProcessor::ComputeResultImages#23
Copilot wants to merge 3 commits intoissue19_conanfrom
copilot/sub-pr-21-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 4, 2025

Addresses feedback from PR #21 regarding unnecessary type conversion in nGIProcessor.cpp that created a signed/unsigned mismatch.

Changes

  • Changed N from ptrdiff_t back to size_t to match openbeamDC.Size() return type
  • Moved cast to loop comparison only: for (ptrdiff_t i=0; i<static_cast<ptrdiff_t>(N); i++)

Before:

const ptrdiff_t N=static_cast<ptrdiff_t>(openbeamDC.Size());
#pragma omp parallel for
for (ptrdiff_t i=0; i<N; i++)

After:

const size_t N=openbeamDC.Size();
#pragma omp parallel for
for (ptrdiff_t i=0; i<static_cast<ptrdiff_t>(N); i++)

This preserves the natural unsigned type while maintaining OpenMP compatibility where ptrdiff_t is required for the loop variable.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 4, 2025 12:50
Co-authored-by: anderskaestner <11174364+anderskaestner@users.noreply.github.com>
Co-authored-by: anderskaestner <11174364+anderskaestner@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from PR #21 on Issue19 conan adjustments Fix signed/unsigned mismatch in DpcProcessor::ComputeResultImages Dec 4, 2025
Copilot AI requested a review from anderskaestner December 4, 2025 12:53
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.

2 participants