Skip to content

Commit 4c6a057

Browse files
committed
Explicitly specific inline
1 parent 5de749b commit 4c6a057

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8882,8 +8882,8 @@ cdef int _cuPythonInit() except -1 nogil:
88828882
return 0
88838883

88848884
# Create a very small function to check whether we are init'ed, so the C
8885-
# compiler is more likely to inline it.
8886-
cdef int cuPythonInit() except -1 nogil:
8885+
# compiler can inline it.
8886+
cdef inline int cuPythonInit() except -1 nogil:
88878887
if __cuPythonInit:
88888888
return 0
88898889

cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ cdef int _cuPythonInit() except -1 nogil:
323323
return 0
324324

325325
# Create a very small function to check whether we are init'ed, so the C
326-
# compiler is more likely to inline it.
327-
cdef int cuPythonInit() except -1 nogil:
326+
# compiler can inline it.
327+
cdef inline int cuPythonInit() except -1 nogil:
328328
if __cuPythonInit:
329329
return 0
330330

cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ cdef int _cudaPythonInit() except -1 nogil:
1919
return __usePTDS
2020

2121
# Create a very small function to check whether we are init'ed, so the C
22-
# compiler is more likely to inline it.
23-
cdef int cudaPythonInit() except -1 nogil:
22+
# compiler can inline it.
23+
cdef inline int cudaPythonInit() except -1 nogil:
2424
if __cudaPythonInit:
2525
return __usePTDS
2626

0 commit comments

Comments
 (0)