MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / count_numpy

Method count_numpy

include/core/solver.h:1070–1080  ·  view source on GitHub ↗

Count edges for each sample block. This function can be parallelized. */

Source from the content-addressed store, hash-verified

1068
1069 /** Count edges for each sample block. This function can be parallelized. */
1070 void count_numpy(size_t start, size_t end, int id) {
1071 auto &offsets = solver->pool_offsets[id + 1];
1072 auto array = solver->array->unchecked();
1073 for (size_t i = start; i < end; i++) {
1074 Index head_global_id = array(i, 0);
1075 Index tail_global_id = array(i, 1);
1076 int head_partition_id = solver->head_locations[head_global_id].first;
1077 int tail_partition_id = solver->tail_locations[tail_global_id].first;
1078 offsets[head_partition_id][tail_partition_id]++;
1079 }
1080 }
1081
1082 /** Distribute edges to the sample pool. This function can be parallelized. */
1083 void distribute(size_t start, size_t end, int id) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected