Commit 9472aef6 authored by rusty1s's avatar rusty1s
Browse files

add forceinline

parent 01fa24ee
...@@ -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;
......
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