@@ -12,6 +12,7 @@ import numpy as _numpy
1212from cpython cimport buffer as _buffer
1313from cpython.memoryview cimport PyMemoryView_FromMemory
1414from enum import IntEnum as _IntEnum
15+ cimport cpython
1516
1617import cython
1718
@@ -54,6 +55,10 @@ cdef class _py_anon_pod1:
5455 """ Get the pointer address to the data as Python :class:`int`."""
5556 return self ._data.ctypes.data
5657
58+ cdef intptr_t _get_ptr(self ):
59+ """ Get the pointer address to the data as Python :class:`int`."""
60+ return self ._data.ctypes.data
61+
5762 def __int__ (self ):
5863 return self ._data.ctypes.data
5964
@@ -157,6 +162,10 @@ cdef class _py_anon_pod3:
157162 """ Get the pointer address to the data as Python :class:`int`."""
158163 return self ._data.ctypes.data
159164
165+ cdef intptr_t _get_ptr(self ):
166+ """ Get the pointer address to the data as Python :class:`int`."""
167+ return self ._data.ctypes.data
168+
160169 def __int__ (self ):
161170 return self ._data.ctypes.data
162171
@@ -286,6 +295,10 @@ cdef class IOEvents:
286295 """ Get the pointer address to the data as Python :class:`int`."""
287296 return self ._data.ctypes.data
288297
298+ cdef intptr_t _get_ptr(self ):
299+ """ Get the pointer address to the data as Python :class:`int`."""
300+ return self ._data.ctypes.data
301+
289302 def __int__ (self ):
290303 if self ._data.size > 1 :
291304 raise TypeError (" int() argument must be a bytes-like object of size 1. "
@@ -422,6 +435,10 @@ cdef class OpCounter:
422435 """ Get the pointer address to the data as Python :class:`int`."""
423436 return self ._data.ctypes.data
424437
438+ cdef intptr_t _get_ptr(self ):
439+ """ Get the pointer address to the data as Python :class:`int`."""
440+ return self ._data.ctypes.data
441+
425442 def __int__ (self ):
426443 return self ._data.ctypes.data
427444
@@ -551,6 +568,10 @@ cdef class PerGpuStats:
551568 """ Get the pointer address to the data as Python :class:`int`."""
552569 return self ._data.ctypes.data
553570
571+ cdef intptr_t _get_ptr(self ):
572+ """ Get the pointer address to the data as Python :class:`int`."""
573+ return self ._data.ctypes.data
574+
554575 def __int__ (self ):
555576 return self ._data.ctypes.data
556577
@@ -914,6 +935,10 @@ cdef class Descr:
914935 """ Get the pointer address to the data as Python :class:`int`."""
915936 return self ._data.ctypes.data
916937
938+ cdef intptr_t _get_ptr(self ):
939+ """ Get the pointer address to the data as Python :class:`int`."""
940+ return self ._data.ctypes.data
941+
917942 def __int__ (self ):
918943 if self ._data.size > 1 :
919944 raise TypeError (" int() argument must be a bytes-like object of size 1. "
@@ -1052,6 +1077,10 @@ cdef class _py_anon_pod2:
10521077 """ Get the pointer address to the data as Python :class:`int`."""
10531078 return self ._data.ctypes.data
10541079
1080+ cdef intptr_t _get_ptr(self ):
1081+ """ Get the pointer address to the data as Python :class:`int`."""
1082+ return self ._data.ctypes.data
1083+
10551084 def __int__ (self ):
10561085 return self ._data.ctypes.data
10571086
@@ -1185,6 +1214,10 @@ cdef class StatsLevel1:
11851214 """ Get the pointer address to the data as Python :class:`int`."""
11861215 return self ._data.ctypes.data
11871216
1217+ cdef intptr_t _get_ptr(self ):
1218+ """ Get the pointer address to the data as Python :class:`int`."""
1219+ return self ._data.ctypes.data
1220+
11881221 def __int__ (self ):
11891222 return self ._data.ctypes.data
11901223
@@ -1667,6 +1700,10 @@ cdef class IOParams:
16671700 """ Get the pointer address to the data as Python :class:`int`."""
16681701 return self ._data.ctypes.data
16691702
1703+ cdef intptr_t _get_ptr(self ):
1704+ """ Get the pointer address to the data as Python :class:`int`."""
1705+ return self ._data.ctypes.data
1706+
16701707 def __int__ (self ):
16711708 if self ._data.size > 1 :
16721709 raise TypeError (" int() argument must be a bytes-like object of size 1. "
@@ -1824,6 +1861,10 @@ cdef class StatsLevel2:
18241861 """ Get the pointer address to the data as Python :class:`int`."""
18251862 return self ._data.ctypes.data
18261863
1864+ cdef intptr_t _get_ptr(self ):
1865+ """ Get the pointer address to the data as Python :class:`int`."""
1866+ return self ._data.ctypes.data
1867+
18271868 def __int__ (self ):
18281869 return self ._data.ctypes.data
18291870
@@ -1935,6 +1976,10 @@ cdef class StatsLevel3:
19351976 """ Get the pointer address to the data as Python :class:`int`."""
19361977 return self ._data.ctypes.data
19371978
1979+ cdef intptr_t _get_ptr(self ):
1980+ """ Get the pointer address to the data as Python :class:`int`."""
1981+ return self ._data.ctypes.data
1982+
19381983 def __int__ (self ):
19391984 return self ._data.ctypes.data
19401985
@@ -2458,7 +2503,7 @@ cpdef str get_parameter_string(int param, int len):
24582503 with nogil:
24592504 __status__ = cuFileGetParameterString(< _StringConfigParameter> param, desc_str, len )
24602505 check_status(__status__)
2461- return _desc_str_.decode( )
2506+ return cpython.PyUnicode_FromString(desc_str )
24622507
24632508
24642509cpdef set_parameter_size_t(int param, size_t value):
0 commit comments