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
5d199c86
Commit
5d199c86
authored
Apr 13, 2018
by
rusty1s
Browse files
half cuda bugfix
parent
186c0c93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
aten/THC/THCGrid.cu
aten/THC/THCGrid.cu
+1
-4
No files found.
aten/THC/THCGrid.cu
View file @
5d199c86
...
@@ -8,12 +8,9 @@ __global__ void gridKernel(int64_t *self, TensorInfo<T> posInfo, T *size,
...
@@ -8,12 +8,9 @@ __global__ void gridKernel(int64_t *self, TensorInfo<T> posInfo, T *size,
int64_t
*
count
,
ptrdiff_t
nNodes
)
{
int64_t
*
count
,
ptrdiff_t
nNodes
)
{
KERNEL_LOOP
(
i
,
nNodes
)
{
KERNEL_LOOP
(
i
,
nNodes
)
{
T
*
pos
=
posInfo
.
data
+
i
*
posInfo
.
stride
[
0
];
T
*
pos
=
posInfo
.
data
+
i
*
posInfo
.
stride
[
0
];
T
c
;
int64_t
coef
=
1
,
value
=
0
;
int64_t
coef
=
1
,
value
=
0
;
for
(
ptrdiff_t
d
=
0
;
d
<
posInfo
.
size
[
1
];
d
+=
posInfo
.
stride
[
1
])
{
for
(
ptrdiff_t
d
=
0
;
d
<
posInfo
.
size
[
1
];
d
+=
posInfo
.
stride
[
1
])
{
c
=
THCNumerics
<
T
>::
div
(
pos
[
d
],
size
[
d
]);
value
+=
coef
*
ScalarConvert
<
T
,
int64_t
>::
to
(
THCNumerics
<
T
>::
div
(
pos
[
d
],
size
[
d
]));
c
=
ScalarConvert
<
int64_t
,
T
>::
to
(
ScalarConvert
<
T
,
int64_t
>::
to
(
c
));
value
+=
coef
*
c
;
coef
*=
count
[
d
];
coef
*=
count
[
d
];
}
}
self
[
i
]
=
value
;
self
[
i
]
=
value
;
...
...
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