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
9472aef6
Commit
9472aef6
authored
Apr 20, 2022
by
rusty1s
Browse files
add forceinline
parent
01fa24ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
csrc/cuda/utils.cuh
csrc/cuda/utils.cuh
+3
-2
No files found.
csrc/cuda/utils.cuh
View file @
9472aef6
...
@@ -8,8 +8,9 @@
...
@@ -8,8 +8,9 @@
#define CHECK_CONTIGUOUS(x) \
#define CHECK_CONTIGUOUS(x) \
AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
__device__
int64_t
get_example_idx
(
int64_t
idx
,
const
int64_t
*
ptr
,
__forceinline__
__device__
int64_t
get_example_idx
(
int64_t
idx
,
const
int64_t
num_examples
)
{
const
int64_t
*
ptr
,
const
int64_t
num_examples
)
{
for
(
int64_t
i
=
0
;
i
<
num_examples
;
i
++
)
{
for
(
int64_t
i
=
0
;
i
<
num_examples
;
i
++
)
{
if
(
ptr
[
i
+
1
]
>
idx
)
if
(
ptr
[
i
+
1
]
>
idx
)
return
i
;
return
i
;
...
...
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