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

Method count

include/core/solver.h:1058–1067  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1056
1057 /** Count edges for each sample block. This function can be parallelized. */
1058 void count(size_t start, size_t end, int id) {
1059 auto &offsets = solver->pool_offsets[id + 1];
1060 for (size_t i = start; i < end; i++) {
1061 Index head_global_id = std::get<0>((*solver->samples)[i]);
1062 Index tail_global_id = std::get<1>((*solver->samples)[i]);
1063 int head_partition_id = solver->head_locations[head_global_id].first;
1064 int tail_partition_id = solver->tail_locations[tail_global_id].first;
1065 offsets[head_partition_id][tail_partition_id]++;
1066 }
1067 }
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) {

Callers 2

list_mainFunction · 0.80
~TimerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected