leonarski_f and Claude Opus 4.8
5d9e1be814
portability: replace M_PI / std::numbers::pi with a host+device-safe PI
...
M_PI is a POSIX <math.h> extension that MSVC does not define without
_USE_MATH_DEFINES. std::numbers::pi (introduced in the viewer guard commit) is
C++20, but CUDA here is compiled as C++17 (CMAKE_CUDA_STANDARD 17) and several
common/ headers are pulled into .cu device translation units, so std::numbers is
not available there.
Add common/JFJochMath.h with a dependency-free `constexpr double PI` that works
in host code (including MSVC), in CUDA device code, and under C++17/20, and use
it everywhere:
- common/ and image_analysis/ (incl. CUDA .cu): 78 M_PI occurrences, 22 files
- broker/OpenAPIConvert.cpp
- viewer/: the 5 files that used std::numbers::pi now use PI, for one consistent
convention across the codebase
Verified to build: JFJochImageAnalysis (incl. CUDA), jfjoch_viewer, JFJochBroker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-18 14:54:01 +02:00
..
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-29 09:50:50 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:25:30 +02:00
2026-06-08 08:30:35 +02:00
2025-10-20 20:43:44 +02:00
2026-06-18 14:54:01 +02:00
2026-06-15 13:48:11 +02:00
2026-06-15 13:48:11 +02:00
2026-03-05 22:13:12 +01:00
2026-06-08 08:30:35 +02:00
2026-06-17 20:25:36 +02:00
2026-02-01 13:29:33 +01:00
2026-06-08 08:30:35 +02:00
2025-05-28 18:49:27 +02:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2026-05-28 18:48:35 +02:00
2026-05-28 18:48:35 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2026-06-17 20:25:36 +02:00
2026-06-17 20:25:36 +02:00
2026-06-17 20:25:36 +02:00
2026-04-29 09:50:50 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 15:37:27 +02:00
2026-06-08 15:37:27 +02:00
2026-05-28 18:48:35 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2025-11-19 09:40:50 +01:00
2026-06-08 08:30:35 +02:00
2026-04-29 09:50:50 +02:00
2026-06-08 08:30:35 +02:00
2026-04-30 22:16:50 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 15:47:12 +02:00
2026-06-18 14:25:30 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2024-11-22 21:25:20 +01:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2025-11-19 17:28:10 +01:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-02-01 13:29:33 +01:00
2026-06-17 17:03:13 +02:00
2026-06-08 08:30:35 +02:00
2026-04-29 09:50:50 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 15:37:27 +02:00
2024-12-02 21:17:14 +01:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 15:47:12 +02:00
2026-03-05 22:13:12 +01:00
2025-09-22 19:49:39 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2025-05-28 18:49:27 +02:00
2026-06-08 08:30:35 +02:00
2026-06-17 08:37:21 +02:00
2026-06-08 08:30:35 +02:00
2026-05-01 17:06:36 +02:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:25:30 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-11 21:25:05 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-06-18 14:54:01 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2024-12-08 13:26:13 +01:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-06-15 12:42:25 +02:00
2026-06-15 13:48:11 +02:00
2025-06-15 17:46:46 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2026-06-08 08:30:35 +02:00
2025-09-08 20:28:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-04-16 11:59:59 +02:00
2025-12-12 21:24:20 +01:00
2026-06-08 08:30:35 +02:00
2026-05-28 18:48:35 +02:00
2026-05-28 18:48:35 +02:00
2025-09-21 19:27:51 +02:00
2026-06-08 08:30:35 +02:00
2026-03-03 22:24:44 +01:00
2026-06-08 08:30:35 +02:00
2026-04-16 11:59:59 +02:00
2026-06-08 08:30:35 +02:00