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