コード例 #1
0
ファイル: misc.py プロジェクト: thinking-tower/taichi
def reset():
    """Resets Taichi to its initial state.

    This would destroy all the fields and kernels.
    """
    impl.reset()
    global runtime
    runtime = impl.get_runtime()
コード例 #2
0
ファイル: __init__.py プロジェクト: YuCrazing/taichi-1
def reset():
    """Resets Taichi to its initial state.

    This would destroy all the fields and kernels.
    """
    _ti_core.reset_snode_access_flag()
    impl.reset()
    global runtime
    runtime = impl.get_runtime()
コード例 #3
0
ファイル: misc.py プロジェクト: taichi-dev/taichi
def reset():
    """Resets Taichi to its initial state.
    This will destroy all the allocated fields and kernels, and restore
    the runtime to its default configuration.

    Example::

        >>> a = ti.field(ti.i32, shape=())
        >>> a[None] = 1
        >>> print("before reset: ", a)
        before rest: 1
        >>>
        >>> ti.reset()
        >>> print("after reset: ", a)
        # will raise error because a is unavailable after reset.
    """
    impl.reset()
    global runtime
    runtime = impl.get_runtime()
コード例 #4
0
ファイル: __init__.py プロジェクト: LongJohnCoder/taichi
def reset():
    impl.reset()
    global runtime
    runtime = impl.get_runtime()
コード例 #5
0
def reset():
    _ti_core.reset_snode_access_flag()
    impl.reset()
    global runtime
    runtime = impl.get_runtime()