kerncraft/cachetile.py
def simulate(kernel, model, define_dict, blocking_constant, blocking_length):
    """Setup and execute model with given blocking length"""
    kernel.clear_state()

    # Add constants from define arguments
    for k, v in define_dict.items():
        kernel.set_constant(k, v)

    kernel.set_constant(blocking_constant, blocking_length)

    model.analyze()
    return sum([cy for dscr, cy in model.results['cycles']])
def simulate(kernel, model, define_dict, blocking_constant, blocking_length):
    """Setup and execute model with given blocking length"""
    kernel.clear_state()

    # Add constants from define arguments
    for k, v in define_dict.items():
        kernel.set_constant(k, v)

    kernel.set_constant(blocking_constant, blocking_length)

    model.analyze()
    return sum([cy for dscr, cy in model.results['cycles']])
Setup and execute model with given blocking length