@@ -8,7 +8,7 @@ import cython
8
8
import ctypes
9
9
from libc.stdlib cimport calloc, malloc, free
10
10
from libc cimport string
11
- from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t
11
+ from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t, uintptr_t
12
12
from libc.stddef cimport wchar_t
13
13
from libc.limits cimport CHAR_MIN
14
14
from libcpp.vector cimport vector
@@ -6529,6 +6529,8 @@ cdef class CUcontext:
6529
6529
if not isinstance(other, CUcontext):
6530
6530
return False
6531
6531
return self._pvt_ptr[0] == (<CUcontext>other)._pvt_ptr[0]
6532
+ def __hash__(self):
6533
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6532
6534
def __int__(self):
6533
6535
return <void_ptr>self._pvt_ptr[0]
6534
6536
def getPtr(self):
@@ -6564,6 +6566,8 @@ cdef class CUmodule:
6564
6566
if not isinstance(other, CUmodule):
6565
6567
return False
6566
6568
return self._pvt_ptr[0] == (<CUmodule>other)._pvt_ptr[0]
6569
+ def __hash__(self):
6570
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6567
6571
def __int__(self):
6568
6572
return <void_ptr>self._pvt_ptr[0]
6569
6573
def getPtr(self):
@@ -6599,6 +6603,8 @@ cdef class CUfunction:
6599
6603
if not isinstance(other, CUfunction):
6600
6604
return False
6601
6605
return self._pvt_ptr[0] == (<CUfunction>other)._pvt_ptr[0]
6606
+ def __hash__(self):
6607
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6602
6608
def __int__(self):
6603
6609
return <void_ptr>self._pvt_ptr[0]
6604
6610
def getPtr(self):
@@ -6634,6 +6640,8 @@ cdef class CUlibrary:
6634
6640
if not isinstance(other, CUlibrary):
6635
6641
return False
6636
6642
return self._pvt_ptr[0] == (<CUlibrary>other)._pvt_ptr[0]
6643
+ def __hash__(self):
6644
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6637
6645
def __int__(self):
6638
6646
return <void_ptr>self._pvt_ptr[0]
6639
6647
def getPtr(self):
@@ -6669,6 +6677,8 @@ cdef class CUkernel:
6669
6677
if not isinstance(other, CUkernel):
6670
6678
return False
6671
6679
return self._pvt_ptr[0] == (<CUkernel>other)._pvt_ptr[0]
6680
+ def __hash__(self):
6681
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6672
6682
def __int__(self):
6673
6683
return <void_ptr>self._pvt_ptr[0]
6674
6684
def getPtr(self):
@@ -6704,6 +6714,8 @@ cdef class CUarray:
6704
6714
if not isinstance(other, CUarray):
6705
6715
return False
6706
6716
return self._pvt_ptr[0] == (<CUarray>other)._pvt_ptr[0]
6717
+ def __hash__(self):
6718
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6707
6719
def __int__(self):
6708
6720
return <void_ptr>self._pvt_ptr[0]
6709
6721
def getPtr(self):
@@ -6739,6 +6751,8 @@ cdef class CUmipmappedArray:
6739
6751
if not isinstance(other, CUmipmappedArray):
6740
6752
return False
6741
6753
return self._pvt_ptr[0] == (<CUmipmappedArray>other)._pvt_ptr[0]
6754
+ def __hash__(self):
6755
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6742
6756
def __int__(self):
6743
6757
return <void_ptr>self._pvt_ptr[0]
6744
6758
def getPtr(self):
@@ -6774,6 +6788,8 @@ cdef class CUtexref:
6774
6788
if not isinstance(other, CUtexref):
6775
6789
return False
6776
6790
return self._pvt_ptr[0] == (<CUtexref>other)._pvt_ptr[0]
6791
+ def __hash__(self):
6792
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6777
6793
def __int__(self):
6778
6794
return <void_ptr>self._pvt_ptr[0]
6779
6795
def getPtr(self):
@@ -6809,6 +6825,8 @@ cdef class CUsurfref:
6809
6825
if not isinstance(other, CUsurfref):
6810
6826
return False
6811
6827
return self._pvt_ptr[0] == (<CUsurfref>other)._pvt_ptr[0]
6828
+ def __hash__(self):
6829
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6812
6830
def __int__(self):
6813
6831
return <void_ptr>self._pvt_ptr[0]
6814
6832
def getPtr(self):
@@ -6844,6 +6862,8 @@ cdef class CUevent:
6844
6862
if not isinstance(other, CUevent):
6845
6863
return False
6846
6864
return self._pvt_ptr[0] == (<CUevent>other)._pvt_ptr[0]
6865
+ def __hash__(self):
6866
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6847
6867
def __int__(self):
6848
6868
return <void_ptr>self._pvt_ptr[0]
6849
6869
def getPtr(self):
@@ -6879,6 +6899,8 @@ cdef class CUstream:
6879
6899
if not isinstance(other, CUstream):
6880
6900
return False
6881
6901
return self._pvt_ptr[0] == (<CUstream>other)._pvt_ptr[0]
6902
+ def __hash__(self):
6903
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6882
6904
def __int__(self):
6883
6905
return <void_ptr>self._pvt_ptr[0]
6884
6906
def getPtr(self):
@@ -6914,6 +6936,8 @@ cdef class CUgraphicsResource:
6914
6936
if not isinstance(other, CUgraphicsResource):
6915
6937
return False
6916
6938
return self._pvt_ptr[0] == (<CUgraphicsResource>other)._pvt_ptr[0]
6939
+ def __hash__(self):
6940
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6917
6941
def __int__(self):
6918
6942
return <void_ptr>self._pvt_ptr[0]
6919
6943
def getPtr(self):
@@ -6949,6 +6973,8 @@ cdef class CUexternalMemory:
6949
6973
if not isinstance(other, CUexternalMemory):
6950
6974
return False
6951
6975
return self._pvt_ptr[0] == (<CUexternalMemory>other)._pvt_ptr[0]
6976
+ def __hash__(self):
6977
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6952
6978
def __int__(self):
6953
6979
return <void_ptr>self._pvt_ptr[0]
6954
6980
def getPtr(self):
@@ -6984,6 +7010,8 @@ cdef class CUexternalSemaphore:
6984
7010
if not isinstance(other, CUexternalSemaphore):
6985
7011
return False
6986
7012
return self._pvt_ptr[0] == (<CUexternalSemaphore>other)._pvt_ptr[0]
7013
+ def __hash__(self):
7014
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
6987
7015
def __int__(self):
6988
7016
return <void_ptr>self._pvt_ptr[0]
6989
7017
def getPtr(self):
@@ -7019,6 +7047,8 @@ cdef class CUgraph:
7019
7047
if not isinstance(other, CUgraph):
7020
7048
return False
7021
7049
return self._pvt_ptr[0] == (<CUgraph>other)._pvt_ptr[0]
7050
+ def __hash__(self):
7051
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7022
7052
def __int__(self):
7023
7053
return <void_ptr>self._pvt_ptr[0]
7024
7054
def getPtr(self):
@@ -7054,6 +7084,8 @@ cdef class CUgraphNode:
7054
7084
if not isinstance(other, CUgraphNode):
7055
7085
return False
7056
7086
return self._pvt_ptr[0] == (<CUgraphNode>other)._pvt_ptr[0]
7087
+ def __hash__(self):
7088
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7057
7089
def __int__(self):
7058
7090
return <void_ptr>self._pvt_ptr[0]
7059
7091
def getPtr(self):
@@ -7089,6 +7121,8 @@ cdef class CUgraphExec:
7089
7121
if not isinstance(other, CUgraphExec):
7090
7122
return False
7091
7123
return self._pvt_ptr[0] == (<CUgraphExec>other)._pvt_ptr[0]
7124
+ def __hash__(self):
7125
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7092
7126
def __int__(self):
7093
7127
return <void_ptr>self._pvt_ptr[0]
7094
7128
def getPtr(self):
@@ -7124,6 +7158,8 @@ cdef class CUmemoryPool:
7124
7158
if not isinstance(other, CUmemoryPool):
7125
7159
return False
7126
7160
return self._pvt_ptr[0] == (<CUmemoryPool>other)._pvt_ptr[0]
7161
+ def __hash__(self):
7162
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7127
7163
def __int__(self):
7128
7164
return <void_ptr>self._pvt_ptr[0]
7129
7165
def getPtr(self):
@@ -7159,6 +7195,8 @@ cdef class CUuserObject:
7159
7195
if not isinstance(other, CUuserObject):
7160
7196
return False
7161
7197
return self._pvt_ptr[0] == (<CUuserObject>other)._pvt_ptr[0]
7198
+ def __hash__(self):
7199
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7162
7200
def __int__(self):
7163
7201
return <void_ptr>self._pvt_ptr[0]
7164
7202
def getPtr(self):
@@ -7194,6 +7232,8 @@ cdef class CUgraphDeviceNode:
7194
7232
if not isinstance(other, CUgraphDeviceNode):
7195
7233
return False
7196
7234
return self._pvt_ptr[0] == (<CUgraphDeviceNode>other)._pvt_ptr[0]
7235
+ def __hash__(self):
7236
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7197
7237
def __int__(self):
7198
7238
return <void_ptr>self._pvt_ptr[0]
7199
7239
def getPtr(self):
@@ -7229,6 +7269,8 @@ cdef class CUasyncCallbackHandle:
7229
7269
if not isinstance(other, CUasyncCallbackHandle):
7230
7270
return False
7231
7271
return self._pvt_ptr[0] == (<CUasyncCallbackHandle>other)._pvt_ptr[0]
7272
+ def __hash__(self):
7273
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7232
7274
def __int__(self):
7233
7275
return <void_ptr>self._pvt_ptr[0]
7234
7276
def getPtr(self):
@@ -7264,6 +7306,8 @@ cdef class CUgreenCtx:
7264
7306
if not isinstance(other, CUgreenCtx):
7265
7307
return False
7266
7308
return self._pvt_ptr[0] == (<CUgreenCtx>other)._pvt_ptr[0]
7309
+ def __hash__(self):
7310
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7267
7311
def __int__(self):
7268
7312
return <void_ptr>self._pvt_ptr[0]
7269
7313
def getPtr(self):
@@ -7297,6 +7341,8 @@ cdef class CUlinkState:
7297
7341
if not isinstance(other, CUlinkState):
7298
7342
return False
7299
7343
return self._pvt_ptr[0] == (<CUlinkState>other)._pvt_ptr[0]
7344
+ def __hash__(self):
7345
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7300
7346
def __int__(self):
7301
7347
return <void_ptr>self._pvt_ptr[0]
7302
7348
def getPtr(self):
@@ -7332,6 +7378,8 @@ cdef class CUdevResourceDesc:
7332
7378
if not isinstance(other, CUdevResourceDesc):
7333
7379
return False
7334
7380
return self._pvt_ptr[0] == (<CUdevResourceDesc>other)._pvt_ptr[0]
7381
+ def __hash__(self):
7382
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7335
7383
def __int__(self):
7336
7384
return <void_ptr>self._pvt_ptr[0]
7337
7385
def getPtr(self):
@@ -7365,6 +7413,8 @@ cdef class CUlogsCallbackHandle:
7365
7413
if not isinstance(other, CUlogsCallbackHandle):
7366
7414
return False
7367
7415
return self._pvt_ptr[0] == (<CUlogsCallbackHandle>other)._pvt_ptr[0]
7416
+ def __hash__(self):
7417
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7368
7418
def __int__(self):
7369
7419
return <void_ptr>self._pvt_ptr[0]
7370
7420
def getPtr(self):
@@ -7400,6 +7450,8 @@ cdef class CUeglStreamConnection:
7400
7450
if not isinstance(other, CUeglStreamConnection):
7401
7451
return False
7402
7452
return self._pvt_ptr[0] == (<CUeglStreamConnection>other)._pvt_ptr[0]
7453
+ def __hash__(self):
7454
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7403
7455
def __int__(self):
7404
7456
return <void_ptr>self._pvt_ptr[0]
7405
7457
def getPtr(self):
@@ -7433,6 +7485,8 @@ cdef class EGLImageKHR:
7433
7485
if not isinstance(other, EGLImageKHR):
7434
7486
return False
7435
7487
return self._pvt_ptr[0] == (<EGLImageKHR>other)._pvt_ptr[0]
7488
+ def __hash__(self):
7489
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7436
7490
def __int__(self):
7437
7491
return <void_ptr>self._pvt_ptr[0]
7438
7492
def getPtr(self):
@@ -7466,6 +7520,8 @@ cdef class EGLStreamKHR:
7466
7520
if not isinstance(other, EGLStreamKHR):
7467
7521
return False
7468
7522
return self._pvt_ptr[0] == (<EGLStreamKHR>other)._pvt_ptr[0]
7523
+ def __hash__(self):
7524
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7469
7525
def __int__(self):
7470
7526
return <void_ptr>self._pvt_ptr[0]
7471
7527
def getPtr(self):
@@ -7499,6 +7555,8 @@ cdef class EGLSyncKHR:
7499
7555
if not isinstance(other, EGLSyncKHR):
7500
7556
return False
7501
7557
return self._pvt_ptr[0] == (<EGLSyncKHR>other)._pvt_ptr[0]
7558
+ def __hash__(self):
7559
+ return hash(<uintptr_t><void*>(self._pvt_ptr[0]))
7502
7560
def __int__(self):
7503
7561
return <void_ptr>self._pvt_ptr[0]
7504
7562
def getPtr(self):
0 commit comments