Support custom slime chunk patterns in CUDA finder

This commit is contained in:
Yaossg 2026-10-16 23:51:12 +08:00
parent dd5fab9540
commit 7952207735
10 changed files with 2302 additions and 34 deletions

View file

@ -1,8 +1,8 @@
# 共用算法头文件
- `slime/solver_core.hpp`:Java 整数回绕、48 位随机数、精确史莱姆判定、低位约束和原高位求解器。
- `slime/upper_interval.hpp`:输出差必要条件与高位区间求交,用于实心图案的普通候选分支。
- `slime/upper_interval.hpp`:输出差必要条件与高位区间求交,用于正约束(可稀疏图案)的普通候选分支;CLI 在发出结果前核对非史莱姆约束。
CLI 直接依赖这里。`research/slime_solver_core.hpp` 和原实验目录的 `interval_solver.hpp` 仅转发包含,以便已有研究程序、教学代码和历史复现命令继续工作。
本次只迁移实现位置,保留现有命名空间及算法语义。精确验证支持 Java 重试,不代表普通候选生成已经包含拒绝尾部补扫。
保留现有命名空间及算法语义。精确验证支持 Java 重试,不代表普通候选生成已经包含拒绝尾部补扫。

View file

@ -13,8 +13,9 @@
namespace full_search_experiment {
namespace sr = slime_research;
// Solid patterns only. Each surviving residue has a single interval.
// Keeping just the anchor's two residues makes intersection constant-space.
// Positive (slime) constraints only; positions may be sparse.
// Each surviving residue has a single interval. Keeping the first cell's
// two residues makes intersection constant-space. Check negative cells on emit.
template<class Emit>
FS_HD FS_INLINE void solveIntervals(uint64_t low, const sr::CellTerm* cells,
int count, Emit& emit) {