loopy/schedule/device_mapping.py
def add_extra_args_to_schedule(kernel):
    """
    Fill the `extra_args` fields in all the :class:`loopy.schedule.CallKernel`
    instructions in the schedule with global temporaries.
    """
    new_schedule = []

    block_bounds = get_block_boundaries(kernel.schedule)
    for idx, sched_item in enumerate(kernel.schedule):
        if isinstance(sched_item, CallKernel):
            defs, uses = get_temporaries_defined_and_used_in_subrange(
                   kernel, kernel.schedule, idx + 1, block_bounds[idx] - 1)
            # Filter out temporaries that are global.
            extra_args = (tv for tv in defs | uses if
                kernel.temporary_variables[tv].scope == temp_var_scope.GLOBAL
                and
                kernel.temporary_variables[tv].initializer is None)
            new_schedule.append(sched_item.copy(extra_args=sorted(extra_args)))
        else:
            new_schedule.append(sched_item)

    return kernel.copy(schedule=new_schedule)

    Fill the `extra_args` fields in all the :class:`loopy.schedule.CallKernel`
    instructions in the schedule with global temporaries.
    
Fill the `extra_args` fields in all the :class:`loopy.schedule.CallKernel`
instructions in the schedule with global temporaries.
Fill the ` extra_args ` fields in all the : class : ` loopy . schedule . CallKernel ` instructions in the schedule with global temporaries .
def add_extra_args_to_schedule(kernel):
    new_schedule = []
    block_bounds = get_block_boundaries(kernel.schedule)
    for idx, sched_item in enumerate(kernel.schedule):
        if isinstance(sched_item, CallKernel):
            defs, uses = get_temporaries_defined_and_used_in_subrange(
                   kernel, kernel.schedule, idx + 1, block_bounds[idx] - 1)
            extra_args = (tv for tv in defs | uses if
                kernel.temporary_variables[tv].scope == temp_var_scope.GLOBAL
                and
                kernel.temporary_variables[tv].initializer is None)
            new_schedule.append(sched_item.copy(extra_args=sorted(extra_args)))
        else:
            new_schedule.append(sched_item)
    return kernel.copy(schedule=new_schedule)
def add_extra_args_to_schedule ( kernel ) : new_schedule = [ ] block_bounds = get_block_boundaries ( kernel . schedule ) for idx , sched_item in enumerate ( kernel . schedule ) : if isinstance ( sched_item , CallKernel ) : defs , uses = get_temporaries_defined_and_used_in_subrange ( kernel , kernel . schedule , idx + 1 , block_bounds [ idx ] - 1 ) extra_args = ( tv for tv in defs | uses if kernel . temporary_variables [ tv ] . scope == temp_var_scope . GLOBAL and kernel . temporary_variables [ tv ] . initializer is None ) new_schedule . append ( sched_item . copy ( extra_args = sorted ( extra_args ) ) ) else : new_schedule . append ( sched_item ) return kernel . copy ( schedule = new_schedule )
Fill the `extra_args` fields in all the :class:`loopy.schedule.CallKernel`
instructions in the schedule with global temporaries.
Fill the ` extra_args ` fields in all the : class : ` loopy . schedule . CallKernel ` instructions in the schedule with global temporaries .
"""
    Fill the `extra_args` fields in all the :class:`loopy.schedule.CallKernel`
    instructions in the schedule with global temporaries.
    """ # Filter out temporaries that are global.
kernel