Added memoized function from python wiki
https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize
Cleaned up stray output for opencl test