Skip to content

Replace OpenMP with C++11 std::thread for cross-platform compatibility#8

Merged
stevevanhooser merged 1 commit intomainfrom
update-cpp-threading-15383406703373410588
Feb 24, 2026
Merged

Replace OpenMP with C++11 std::thread for cross-platform compatibility#8
stevevanhooser merged 1 commit intomainfrom
update-cpp-threading-15383406703373410588

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

This change removes the OpenMP dependency by rewriting the core C engine in C++11 using standard threading primitives. This ensures compatibility with macOS (which often lacks OpenMP support by default) and simplifies the build process. The ordered writing logic required by the file format is preserved using a ticket lock mechanism. The public API remains compatible via extern "C". MATLAB build scripts and CMake configuration have been updated accordingly.


PR created automatically by Jules for task 15383406703373410588 started by @stevevanhooser

- Renamed src/c/pyraview.c to src/c/pyraview.cpp.
- Implemented threaded execution using std::thread, std::mutex, and std::condition_variable.
- Replaced OpenMP 'ordered' directive with a ticket-based ordered write system.
- Updated CMakeLists.txt to use C++11 and link Threads instead of OpenMP.
- Updated src/matlab/build_pyraview.m to compile the C++ source and remove OpenMP flags.
- Verified with existing C tests.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@stevevanhooser stevevanhooser merged commit 4ac4a64 into main Feb 24, 2026
6 checks passed
@stevevanhooser stevevanhooser deleted the update-cpp-threading-15383406703373410588 branch February 24, 2026 14:07
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.

1 participant