ev-potree-parallel-policy-unseq-sort-003¶
| 字段 | 值 |
|---|---|
| 项目 | potree/PotreeConverter |
| 固定 commit | c2cb61843bf2 |
| 路径 | Converter/include/sampler_poisson.h |
| 行段 | L183-L184 |
| 特性 | 并行算法与执行策略 |
| 许可证 | BSD-2-Clause |
| 代码来源 | 项目源码 |
| 级别 | manual |
| 审核 | zyuhao7 @ 2026-10-27 |
| 测试代码 | 否 |
| 发现方式 | manual |
用法¶
用 std::execution::par_unseq 并行排序点云
为什么典型¶
比较器只读点坐标、不访问共享状态,满足 unsequenced 策略对可重入性的要求。
摘录¶
auto parallel = std::execution::par_unseq;
std::sort(parallel, points.begin(), points.end(), [center](Point a, Point b) -> bool {
备注¶
生产路径;泊松采样前的按距中心排序,数据量大、排序耗时显著。