コード例 #1
0
ファイル: driver.py プロジェクト: ASPP/numba
def host_pointer(obj):
    """
    NOTE: The underlying data pointer from the host data buffer is used and
    it should not be changed until the operation which can be asynchronous
    completes.
    """
    if isinstance(obj, (int, long)):
        return obj
    return mviewbuf.memoryview_get_buffer(obj)
コード例 #2
0
def host_pointer(obj):
    """
    NOTE: The underlying data pointer from the host data buffer is used and
    it should not be changed until the operation which can be asynchronous
    completes.
    """
    if isinstance(obj, (int, long)):
        return obj
    return mviewbuf.memoryview_get_buffer(obj)