Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
c663c5b1
"docs/vscode:/vscode.git/clone" did not exist on "5a5b0fc39dfdaaf2d6cf75e00e1c4a5a382dd59f"
Commit
c663c5b1
authored
Apr 07, 2018
by
rusty1s
Browse files
added comments
parent
763644ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
aten/THC/THCPropose.cuh
aten/THC/THCPropose.cuh
+2
-2
aten/THC/THCResponse.cuh
aten/THC/THCResponse.cuh
+2
-2
No files found.
aten/THC/THCPropose.cuh
View file @
c663c5b1
...
@@ -31,13 +31,13 @@ __global__ void weightedProposeKernel(int64_t *color, int64_t *prop, int64_t *ro
...
@@ -31,13 +31,13 @@ __global__ void weightedProposeKernel(int64_t *color, int64_t *prop, int64_t *ro
c
=
col
[
e
];
c
=
col
[
e
];
tmp
=
weight
[
e
];
tmp
=
weight
[
e
];
if
(
isDead
&&
color
[
c
]
<
0
)
{
isDead
=
false
;
}
// Unmatched neighbor found.
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
))
{
if
(
color
[
c
]
==
-
2
&&
THCNumerics
<
T
>::
gt
(
tmp
,
maxWeight
))
{
matchedValue
=
c
;
matchedValue
=
c
;
maxWeight
=
tmp
;
maxWeight
=
tmp
;
}
}
}
}
prop
[
i
]
=
matchedValue
;
prop
[
i
]
=
matchedValue
;
// Propose.
if
(
isDead
)
{
color
[
i
]
=
i
;
}
// Mark node as dead.
if
(
isDead
)
{
color
[
i
]
=
i
;
}
// Mark node as dead.
}
}
}
}
...
...
aten/THC/THCResponse.cuh
View file @
c663c5b1
...
@@ -34,13 +34,13 @@ __global__ void weightedResponseKernel(int64_t *color, int64_t *prop, int64_t *r
...
@@ -34,13 +34,13 @@ __global__ void weightedResponseKernel(int64_t *color, int64_t *prop, int64_t *r
c
=
col
[
e
];
c
=
col
[
e
];
tmp
=
weight
[
e
];
tmp
=
weight
[
e
];
if
(
isDead
&&
color
[
c
]
<
0
)
{
isDead
=
false
;
}
// Unmatched neighbor found.
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
))
{
if
(
color
[
c
]
==
-
1
&&
prop
[
c
]
==
i
&&
THCNumerics
<
T
>::
gt
(
tmp
,
maxWeight
))
{
matchedValue
=
c
;
matchedValue
=
c
;
maxWeight
=
tmp
;
maxWeight
=
tmp
;
}
}
}
}
if
(
matchedValue
>=
0
)
{
if
(
matchedValue
>=
0
)
{
// Match neighbors.
color
[
i
]
=
min
(
i
,
matchedValue
);
color
[
i
]
=
min
(
i
,
matchedValue
);
color
[
matchedValue
]
=
min
(
i
,
matchedValue
);
color
[
matchedValue
]
=
min
(
i
,
matchedValue
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment