Commit c663c5b1 authored by rusty1s's avatar rusty1s
Browse files

added comments

parent 763644ec
......@@ -31,13 +31,13 @@ __global__ void weightedProposeKernel(int64_t *color, int64_t *prop, int64_t *ro
c = col[e];
tmp = weight[e];
if (isDead && color[c] < 0) { isDead = false; } // Unmatched neighbor found.
// Propose to current maximum weighted red neighbor.
// Find maximum weighted red neighbor.
if (color[c] == -2 && THCNumerics<T>::gt(tmp, maxWeight)) {
matchedValue = c;
maxWeight = tmp;
}
}
prop[i] = matchedValue;
prop[i] = matchedValue; // Propose.
if (isDead) { color[i] = i; } // Mark node as dead.
}
}
......
......@@ -34,13 +34,13 @@ __global__ void weightedResponseKernel(int64_t *color, int64_t *prop, int64_t *r
c = col[e];
tmp = weight[e];
if (isDead && color[c] < 0) { isDead = false; } // Unmatched neighbor found.
// Match maximum weighted blue neighbor, who proposed to i.
// Find maximum weighted blue neighbor, who proposed to i.
if (color[c] == -1 && prop[c] == i && THCNumerics<T>::gt(tmp, maxWeight)) {
matchedValue = c;
maxWeight = tmp;
}
}
if (matchedValue >= 0) {
if (matchedValue >= 0) { // Match neighbors.
color[i] = min(i, matchedValue);
color[matchedValue] = min(i, matchedValue);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment