I need a program which enables to enlarge font size and make black background
to the code (and set highlighting so that eyes does not hurt / get tired). |
PyScripter can do that [1].
I have downloaded numpy-unoptimized-1.7.1.win32-py2.5.exe and pyopencl-2013.1.win32-py2.6.exe that I could test your code. What version of Pyhton do I need to download be it compatible with these programs? |
I'm using...
pyopencl-2013.1.win-amd64-py2.7.exe
numpy-MKL-1.7.1.win-amd64-py2.7.exe
Pillow-2.1.0.win-amd64-py2.7.exe
...from here -> [2], with python 2.7.5 64bit (Windows X86-64 MSI Installer (2.7.5) from here -> [3]).
If you want 32bit versions, I suggest using...
pyopencl-2013.1.win32-py2.7.exe
numpy-MKL-1.7.1.win32-py2.7.exe
Pillow-2.1.0.win32-py2.7.exe
...from here -> [2], with python 2.7.5 32bit (Windows x86 MSI Installer (2.7.5) from here -> [3]).
I think I will need to get the Open GL too? |
You don't need OpenGL to test the above code.
Last thing I wanted to ask you if the Python is simpler or harder than C++. As I see C++ is very exact when it comes to define types. Do you also use C++ or are you only Python programmer? From the piece of code you send it looks that Python is not so strict for type declarations and variable declarations. That could be advantage if it will make programming more simpler and faster than in C++. |
In general, python code is smaller than C++ code for the same task. Also, in general, python code is slower than C++ code for the same task. When you use python with OpenCL though, the latter doesn't matter, as the hard work is done by your GPU. This way, you get the best of both worlds: small code size
and fast execution.
When you test the code above, make sure that you pick
a GPU device. It just happens for me that this code...
1 2
|
platform = cl.get_platforms()[0]
device = platform.get_devices()[0]
|
...picks my GPU, but this may not be the case for you.
[1]
http://stackoverflow.com/q/2246710
[2]
http://www.lfd.uci.edu/~gohlke/pythonlibs/
[3]
http://www.python.org/download/releases/2.7.5/