linkcell 0.3.6__tar.gz → 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linkcell-0.3.6 → linkcell-0.3.7}/CHANGELOG.md +6 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/Cargo.lock +2 -2
- {linkcell-0.3.6 → linkcell-0.3.7}/Cargo.toml +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/PKG-INFO +2 -2
- {linkcell-0.3.6 → linkcell-0.3.7}/README.md +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/how-to/embed-c.md +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/meson.build +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/pyproject.toml +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/python/Cargo.toml +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/src/pairs.rs +64 -2
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/python/test_knearest.py +1 -1
- {linkcell-0.3.6 → linkcell-0.3.7}/.github/scripts/setup-msvc.ps1 +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/.github/workflows/ci.yml +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/.github/workflows/publish.yml +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/.github/workflows/wheels.yml +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/.gitignore +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/CITATION.cff +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/CMakeLists.txt +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/LICENSE +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/assets/branding/README.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/assets/branding/linkcell-icon.svg +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/assets/branding/linkcell-logo-dark.svg +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/assets/branding/linkcell-logo-light.svg +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/assets/branding/linkcell-mark.jpg +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/build.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/cbindgen.toml +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/changelog.d/.gitkeep +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/changelog.d/README.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/cmake/linkcell-gpu.pc.in +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/cmake/linkcell.pc.in +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/cmake/linkcellConfig.cmake.in +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/explanation/mic-and-cells.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/how-to/embed-cpp.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/how-to/embed-python.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/how-to/pkg-config.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/index.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/reference/algorithm.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/reference/c-api.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/docs/tutorials/two-points.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/knn_hot.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/knn_scale.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/meson.build +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/pairs_scale.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/two_points.c +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/examples/two_points.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/include/linkcell.h +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/include/linkcell.hpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/include/linkcell_gpu.h +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/include/linkcell_gpu.hpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/linkcell/__init__.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/meson_options.txt +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/python/build.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/python/src/gpu.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/python/src/lib.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/bench-kokkos.sh +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/bench-pairs.sh +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/bench-strong.sh +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/check-install.sh +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/copy-cargo-artifacts.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/cutoff_work.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/pop-report.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/scripts/regen-capi-headers.sh +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/bins.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/capi.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/cell.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/error.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/gpu/capi.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/gpu/gpulite_compat.hpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/gpu/knearest.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/knearest.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/kokkos/CMakeLists.txt +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/kokkos/bench.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/kokkos/knearest.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/kokkos/knearest.hpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/lib.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/src/pop.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/subprojects/gpulite.wrap +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/subprojects/packagefiles/gpulite/meson.build +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/abi.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/agree.rs +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/cmake-consumer/CMakeLists.txt +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/cmake-consumer/gpu.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/gpu_agree.cpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/python/test_agree_vesin.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/python/test_knearest_cuda.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/tests/python/test_pairs.py +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/third_party/gpulite/LICENSE +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/third_party/gpulite/README.md +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/third_party/gpulite/gpulite/gpulite.hpp +0 -0
- {linkcell-0.3.6 → linkcell-0.3.7}/towncrier.toml +0 -0
|
@@ -10,6 +10,12 @@ by [towncrier](https://towncrier.readthedocs.io/).
|
|
|
10
10
|
|
|
11
11
|
<!-- towncrier release notes start -->
|
|
12
12
|
|
|
13
|
+
## [0.3.7] - 2026-10-04
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The cutoff list sizes its row buffer from the pairs it found. A shell denser than the ideal-gas estimate no longer writes past that buffer.
|
|
18
|
+
|
|
13
19
|
## [0.3.6] - 2026-10-04
|
|
14
20
|
|
|
15
21
|
### Changed
|
|
@@ -79,7 +79,7 @@ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
|
79
79
|
|
|
80
80
|
[[package]]
|
|
81
81
|
name = "linkcell"
|
|
82
|
-
version = "0.3.
|
|
82
|
+
version = "0.3.7"
|
|
83
83
|
dependencies = [
|
|
84
84
|
"minimage",
|
|
85
85
|
"rayon",
|
|
@@ -87,7 +87,7 @@ dependencies = [
|
|
|
87
87
|
|
|
88
88
|
[[package]]
|
|
89
89
|
name = "linkcell-python"
|
|
90
|
-
version = "0.3.
|
|
90
|
+
version = "0.3.7"
|
|
91
91
|
dependencies = [
|
|
92
92
|
"cc",
|
|
93
93
|
"dlpk",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linkcell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -96,7 +96,7 @@ As a wrap, Meson exposes `linkcell_dep`:
|
|
|
96
96
|
```
|
|
97
97
|
[wrap-git]
|
|
98
98
|
url = https://github.com/d-SEAMS/linkcell.git
|
|
99
|
-
revision = v0.3.
|
|
99
|
+
revision = v0.3.7
|
|
100
100
|
depth = 1
|
|
101
101
|
|
|
102
102
|
[provide]
|
|
@@ -730,8 +730,9 @@ impl Walk<'_> {
|
|
|
730
730
|
fn gather_into(&self, found: &mut Vec<Pair>, scratch: &mut Scratch, start: usize, end: usize) {
|
|
731
731
|
let n_src = self.mesh.offsets[end] - self.mesh.offsets[start];
|
|
732
732
|
let rows = self.guess_rows(n_src);
|
|
733
|
+
// reserve(n) makes capacity >= len + n.
|
|
733
734
|
if found.capacity() < rows {
|
|
734
|
-
found.reserve(rows - found.
|
|
735
|
+
found.reserve(rows - found.len());
|
|
735
736
|
}
|
|
736
737
|
self.fill_only(found, scratch, start, end);
|
|
737
738
|
self.commit(found, scratch);
|
|
@@ -787,8 +788,10 @@ impl Walk<'_> {
|
|
|
787
788
|
rows.push(n);
|
|
788
789
|
total += n;
|
|
789
790
|
}
|
|
791
|
+
// reserve(n) makes capacity >= len + n. The ideal-gas estimate
|
|
792
|
+
// may already hold a shorter buffer.
|
|
790
793
|
if found.capacity() < total {
|
|
791
|
-
found.reserve(total - found.
|
|
794
|
+
found.reserve(total - found.len());
|
|
792
795
|
}
|
|
793
796
|
let mut off = Vec::with_capacity(chunks.len() + 1);
|
|
794
797
|
off.push(0usize);
|
|
@@ -1328,6 +1331,65 @@ mod tests {
|
|
|
1328
1331
|
use super::*;
|
|
1329
1332
|
use crate::Cell;
|
|
1330
1333
|
|
|
1334
|
+
#[test]
|
|
1335
|
+
fn tight_cluster_matches_brute_force() {
|
|
1336
|
+
// Every pair sits inside the cutoff, and the box is large, so the
|
|
1337
|
+
// ideal-gas row estimate is a handful. The walk still has to
|
|
1338
|
+
// return the full list. 520 is above the parallel split.
|
|
1339
|
+
let n = 520usize;
|
|
1340
|
+
let mut xyz = vec![[0.0f64; 3]; n];
|
|
1341
|
+
let g = 9i32;
|
|
1342
|
+
let mut k = 0usize;
|
|
1343
|
+
'fill: for z in 0..g {
|
|
1344
|
+
for y in 0..g {
|
|
1345
|
+
for x in 0..g {
|
|
1346
|
+
if k >= n {
|
|
1347
|
+
break 'fill;
|
|
1348
|
+
}
|
|
1349
|
+
xyz[k] = [x as f64 * 0.05, y as f64 * 0.05, z as f64 * 0.05];
|
|
1350
|
+
k += 1;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
let sim = Cell::ortho(80.0, 80.0, 80.0).unwrap();
|
|
1355
|
+
let cutoff = 2.0;
|
|
1356
|
+
let cut2 = cutoff * cutoff;
|
|
1357
|
+
let mut brute: Vec<(usize, usize, f64)> = Vec::new();
|
|
1358
|
+
for i in 0..n {
|
|
1359
|
+
for j in (i + 1)..n {
|
|
1360
|
+
let dx = xyz[j][0] - xyz[i][0];
|
|
1361
|
+
let dy = xyz[j][1] - xyz[i][1];
|
|
1362
|
+
let dz = xyz[j][2] - xyz[i][2];
|
|
1363
|
+
let d2 = dx * dx + dy * dy + dz * dz;
|
|
1364
|
+
if d2 < cut2 {
|
|
1365
|
+
brute.push((i, j, d2));
|
|
1366
|
+
brute.push((j, i, d2));
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
brute.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1)));
|
|
1371
|
+
let run = || pairs_within(&xyz, &sim, cutoff, None, None, false).unwrap();
|
|
1372
|
+
#[cfg(feature = "parallel")]
|
|
1373
|
+
let got = {
|
|
1374
|
+
let pool = rayon::ThreadPoolBuilder::new()
|
|
1375
|
+
.num_threads(4)
|
|
1376
|
+
.build()
|
|
1377
|
+
.unwrap();
|
|
1378
|
+
pool.install(run)
|
|
1379
|
+
};
|
|
1380
|
+
#[cfg(not(feature = "parallel"))]
|
|
1381
|
+
let got = run();
|
|
1382
|
+
let mut rows: Vec<(usize, usize, f64)> = got.iter().map(|p| (p.i, p.j, p.dist2)).collect();
|
|
1383
|
+
rows.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1)));
|
|
1384
|
+
assert_eq!(rows.len(), n * (n - 1));
|
|
1385
|
+
assert_eq!(rows.len(), brute.len());
|
|
1386
|
+
for (got_row, brute_row) in rows.iter().zip(brute.iter()) {
|
|
1387
|
+
assert_eq!(got_row.0, brute_row.0);
|
|
1388
|
+
assert_eq!(got_row.1, brute_row.1);
|
|
1389
|
+
assert!((got_row.2 - brute_row.2).abs() < 1e-9);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1331
1393
|
#[test]
|
|
1332
1394
|
fn far_image_is_not_rewrapped() {
|
|
1333
1395
|
let sim = Cell::ortho(10.0, 10.0, 10.0).unwrap();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|