MCPcopy Create free account
hub / github.com/apache/arrow / MyObj

Class MyObj

python/pyarrow/tests/test_cuda_numba_interop.py:146–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 # Creating device buffer from am object implementing cuda array
145 # interface:
146 class MyObj:
147 def __init__(self, darr):
148 self.darr = darr
149
150 @property
151 def __cuda_array_interface__(self):
152 return self.darr.__cuda_array_interface__
153
154 cbuf2 = ctx.buffer_from_object(MyObj(darr))
155 assert cbuf2.size == cbuf.size

Callers 1

test_from_objectFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_from_objectFunction · 0.56