def device_extents(devmem):
 s = drvapi.cu_device_ptr()
 n = c_size_t()
 devptr = device_ctypes_pointer(devmem)
 driver.cuMemGetAddressRange(byref(s), byref(n), devptr)
 (s, n) = (s.value, n.value)
 return (s, (s + n))

def device_extents ( devmem ) : s = drvapi . cu_device_ptr ( ) n = c_size_t ( ) devptr = device_ctypes_pointer ( devmem ) driver . cuMemGetAddressRange ( byref ( s ) , byref ( n ) , devptr ) ( s , n ) = ( s . value , n . value ) return ( s , ( s + n ) )
find the extents of the underlying device memory allocation .