Last active
December 14, 2015 01:38
-
-
Save cmd-ntrf/5007185 to your computer and use it in GitHub Desktop.
Example of the distribution of an instance method from a Cython class object with SCOOP.
It uses the Benchmark class defined by pycec2013 available here : https://bitbucket.org/CmdNtrf/niching-benchmark-cec2013
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array | |
import pycec2013 | |
from scoop import futures | |
if __name__ == "__main__": | |
bench = pycec2013.Benchmark(1) | |
pop = [array.array('d', [1.0]), array.array('d', [2.0]), array.array('d', [3.0])] | |
print(list(futures.map(bench.evaluate, pop))) | |
# print(list(map(bench.evaluate, pop))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment