feat: GMP 精确算术后端 + 可插拔谓词接口
CI / Build & Test (push) Failing after 38s
CI / Release Build (push) Failing after 28s

新增:
- include/vde/foundation/exact_predicates_gmp.h: GMP 精确谓词
  - orient_2d/3d, in_circle 完全精确(mpq_class 有理数)
  - 零舍入误差,任意精度
- include/vde/foundation/predicates.h: 统一谓词接口
  - Predicates<T> 编译期选择后端
  - VDE_USE_GMP=ON → GMP, OFF → 自适应 double
  - 便捷函数: orient(), in_circle()
- cmake/FindGMP.cmake: GMP 查找模块
- CMake: -DVDE_USE_GMP=ON 启用 GMP 精确模式
- AdaptiveDouble 包装器: 统一后端接口

使用:
  cmake -DVDE_USE_GMP=ON ..  # 完全精确模式
This commit is contained in:
ViewDesignEngine
2026-07-23 10:32:51 +00:00
parent 029dd6b75a
commit 8ae4b86e08
7 changed files with 167 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
option(BUILD_TESTS "Build tests" ON)
option(BUILD_EXAMPLES "Build examples" ON)
option(ENABLE_SANITIZERS "Enable ASan" OFF)
option(VDE_USE_GMP "GMP exact arithmetic" OFF)
option(VDE_BUILD_PYTHON "Python bindings" OFF)
add_library(vde_compile_options INTERFACE)