MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parallel_map_single_thread

Function parallel_map_single_thread

nodedb/src/engine/graph/olap/parallel.rs:286–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284
285 #[test]
286 fn parallel_map_single_thread() {
287 let snap = make_snapshot();
288 let config = ParallelConfig {
289 num_threads: 1,
290 min_partition_size: 1,
291 };
292
293 let degrees: Vec<usize> = parallel_map(&snap, &config, |node, s| s.out_degree_raw(node));
294
295 assert_eq!(degrees.len(), 100);
296 }
297
298 #[test]
299 fn parallel_map_preserves_order() {

Callers

nothing calls this directly

Calls 3

make_snapshotFunction · 0.85
parallel_mapFunction · 0.85
out_degree_rawMethod · 0.45

Tested by

no test coverage detected