コード例 #1
0
def block_local(*args):
    if ti.current_cfg().dynamic_index:
        raise InvalidOperationError(
            'dynamic_index is not allowed when block_local is turned on.')
    for a in args:
        for v in a.get_field_members():
            _ti_core.insert_snode_access_flag(
                _ti_core.SNodeAccessFlag.block_local, v.ptr)
コード例 #2
0
 def __getattr__(self, item):
     if item == '__qualname__':
         # For sphinx docstring extraction.
         return '_UninitializedRootFieldsBuilder'
     raise InvalidOperationError('Please call init() first')
コード例 #3
0
ファイル: fields_builder.py プロジェクト: YuCrazing/taichi-1
 def _check_not_finalized(self):
     if self._finalized:
         raise InvalidOperationError('FieldsBuilder finalized')
コード例 #4
0
 def id(self):
     if self.destroyed:
         raise InvalidOperationError('SNode tree has been destroyed')
     return self.ptr.id()
コード例 #5
0
 def destroy(self):
     if self.destroyed:
         raise InvalidOperationError('SNode tree has been destroyed')
     self.ptr.destroy_snode_tree(impl.get_runtime().prog)
     self.destroyed = True
コード例 #6
0
ファイル: impl.py プロジェクト: LongJohnCoder/taichi
def layout(func):
    raise InvalidOperationError('layout(): Deprecated')
コード例 #7
0
ファイル: impl.py プロジェクト: LongJohnCoder/taichi
 def __getattr__(self, item):
     raise InvalidOperationError('Please call init() first')