These are reference implementations of basic parallel primitives. These are not actually parallel, but work the same way. They are good for testing.
Reference parallel iterator implementation.
INPUT:
OUTPUT:
EXAMPLES:
sage: def f(N,M=10): return N*M
sage: inputs = [((2,3),{}), (tuple([]), {'N':3,'M':5}), ((2,),{})]
sage: set_random_seed(0)
sage: for a, val in sage.parallel.reference.parallel_iter(f, inputs):
... print a, val
((2,), {}) 20
((), {'M': 5, 'N': 3}) 15
((2, 3), {}) 6
sage: for a, val in sage.parallel.reference.parallel_iter(f, inputs):
... print a, val
((), {'M': 5, 'N': 3}) 15
((2,), {}) 20
((2, 3), {}) 6