Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPU_Persistent map schedule (OpenMP parallel regions) #1330

Merged
merged 3 commits into from
Jul 30, 2023
Merged

Conversation

tbennun
Copy link
Collaborator

@tbennun tbennun commented Jul 25, 2023

This PR adds the ability to generate per-thread code without a for loop, using #pragma omp parallel.

It inherits all the OpenMP properties that the parallel for has (e.g., schedule, number of threads), and internal OpenMP loops detect that they are nested in a parallel region.

It also allows the user to obtain the current thread ID (i.e., the map parameter) and the total number of runtime threads via the reserved __omp_num_threads symbol.

@tbennun tbennun requested a review from acalotoiu July 25, 2023 03:10
Copy link
Contributor

@acalotoiu acalotoiu left a comment

Choose a reason for hiding this comment

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

LGTM

@tbennun tbennun enabled auto-merge (squash) July 30, 2023 20:39
@tbennun tbennun merged commit b97443e into master Jul 30, 2023
9 checks passed
@tbennun tbennun deleted the omp-parallel branch July 30, 2023 22:30
alexnick83 pushed a commit that referenced this pull request Aug 2, 2023
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