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

Function parallel_map_degree

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

Source from the content-addressed store, hash-verified

243
244 #[test]
245 fn parallel_map_degree() {
246 let snap = make_snapshot();
247 let config = ParallelConfig {
248 num_threads: 4,
249 min_partition_size: 10,
250 };
251
252 let degrees: Vec<usize> = parallel_map(&snap, &config, |node, s| s.out_degree_raw(node));
253
254 assert_eq!(degrees.len(), 100);
255 // Each node has out-degree 1 in a 100-node ring.
256 for &d in &degrees {
257 assert_eq!(d, 1);
258 }
259 }
260
261 #[test]
262 fn parallel_reduce_edge_count() {

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