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)
def __getattr__(self, item): if item == '__qualname__': # For sphinx docstring extraction. return '_UninitializedRootFieldsBuilder' raise InvalidOperationError('Please call init() first')
def _check_not_finalized(self): if self._finalized: raise InvalidOperationError('FieldsBuilder finalized')
def id(self): if self.destroyed: raise InvalidOperationError('SNode tree has been destroyed') return self.ptr.id()
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
def layout(func): raise InvalidOperationError('layout(): Deprecated')
def __getattr__(self, item): raise InvalidOperationError('Please call init() first')