Skip to content

Commit 9472aef

Browse files
committed
add forceinline
1 parent 01fa24e commit 9472aef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

csrc/cuda/utils.cuh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
#define CHECK_CONTIGUOUS(x) \
99
AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
1010

11-
__device__ int64_t get_example_idx(int64_t idx, const int64_t *ptr,
12-
const int64_t num_examples) {
11+
__forceinline__ __device__ int64_t get_example_idx(int64_t idx,
12+
const int64_t *ptr,
13+
const int64_t num_examples) {
1314
for (int64_t i = 0; i < num_examples; i++) {
1415
if (ptr[i + 1] > idx)
1516
return i;

0 commit comments

Comments
 (0)