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