Replace OpenMP with C++11 std::thread for cross-platform compatibility#8
Conversation
- 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.
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
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