Skip to content

gpl: fix NVCC errors by refactoring old-style OpenMP loops#10984

Open
SquareRobin wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
SquareRobin:openmp-cuda-fix
Open

gpl: fix NVCC errors by refactoring old-style OpenMP loops#10984
SquareRobin wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
SquareRobin:openmp-cuda-fix

Conversation

@SquareRobin

Copy link
Copy Markdown

Summary

Iterator-based loops cause compile-time errors if GPU acceleration via CUDA (even the latest 13.3.1 is affected) is enabled. Using the newer range-based loops fixes this.

Type of Change

  • Bug fix
  • Refactoring

Impact

No runtime impact.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
@SquareRobin
SquareRobin requested a review from a team as a code owner July 24, 2026 16:11
@SquareRobin
SquareRobin requested a review from gudeh July 24, 2026 16:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes several loops in nesterovBase.cpp by replacing old-style iterator loops with range-based for loops compatible with modern OpenMP. The feedback suggests a safer and more consistent way to calculate the index of an element in a contiguous container using .data() instead of dereferencing the first element of a potentially empty vector.

Comment thread src/gpl/src/nesterovBase.cpp Outdated
Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant