()
| 35 | //! let ends = |s| -> Result<Vec<usize>, HpcParallelError> { |
| 36 | //! Ok(partition_atoms(10, 3, s)?.iter().map(|p| p.end).collect()) |
| 37 | //! }; |
| 38 | //! assert_eq!(ends(PartitionStrategy::Linear)?, [3, 6, 10]); // floor(10 i / 3) |
| 39 | //! assert_eq!(ends(PartitionStrategy::Nested)?, [6, 8, 10]); // round(10 sqrt(i / 3)) |
| 40 | //! |
| 41 | //! // Sum the squares of 1..=100 on four threads, two molecules per thread. |
| 42 | //! let atoms: Vec<u64> = (1..=100).collect(); |
| 43 | //! let cfg = HpcParallelConfig { |
| 44 | //! mode: ExecutionMode::Threaded { num_threads: 4 }, |
| 45 | //! partition: PartitionStrategy::Linear, |
| 46 | //! mp_batches: 2, |
| 47 | //! progress_every: 1, |
nothing calls this directly
no test coverage detected