[PR #1487] [CLOSED] Update kohonen_som_topology.c #2088

Open
opened 2026-01-29 15:28:34 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1487
Author: @shahrinf
Created: 9/29/2025
Status: Closed

Base: masterHead: patch-1


📝 Commits (1)

  • 2c4fd16 Update kohonen_som_topology.c

📊 Changes

1 file changed (+3 additions, -5 deletions)

View changed files

📝 machine_learning/kohonen_som_topology.c (+3 -5)

📄 Description

fix: add OpenMP parallel region for proper loop parallelization

Description of Change

Added an OpenMP parallel region for loops marked with #pragma omp for to enable actual parallel execution.

Previously, the loops had #pragma omp for without a surrounding parallel region, so they executed sequentially.
Now, loops in the function are wrapped in #pragma omp parallel for to correctly distribute iterations across threads.

References

Checklist

  • [ x] Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • [ x] PR title follows semantic commit guidelines
  • [ x] Search previous suggestions before making a new one, as yours may be a duplicate.
  • [ x] I acknowledge that all my contributions will be made under the project's license.

Notes:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1487 **Author:** [@shahrinf](https://github.com/shahrinf) **Created:** 9/29/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`2c4fd16`](https://github.com/TheAlgorithms/C/commit/2c4fd16d3ce3e6318b71e2f677bba32fd523a899) Update kohonen_som_topology.c ### 📊 Changes **1 file changed** (+3 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `machine_learning/kohonen_som_topology.c` (+3 -5) </details> ### 📄 Description fix: add OpenMP parallel region for proper loop parallelization #### Description of Change Added an OpenMP parallel region for loops marked with #pragma omp for to enable actual parallel execution. Previously, the loops had #pragma omp for without a surrounding parallel region, so they executed sequentially. Now, loops in the function are wrapped in #pragma omp parallel for to correctly distribute iterations across threads. <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md --> #### References <!-- Add any reference to previous pull-request or issue --> #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ x] Added description of change - [ ] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [ ] Added tests and example, test must pass - [ ] Relevant documentation/comments is changed or added - [ x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [ x] Search previous suggestions before making a new one, as yours may be a duplicate. - [ x] I acknowledge that all my contributions will be made under the project's license. Notes: <!-- Please add a one-line description for developers or pull request viewers --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:28:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2088