On Fri, Dec 30, 2011 at 1:19 PM, Ralf Gommers
On Fri, Dec 30, 2011 at 5:46 PM, Tony Yu
On Fri, Dec 30, 2011 at 8:20 AM, Nadav Horesh
Remarks for the convolution subpackage: 1. The __init__.py should be probably changed to
from ext import pyconvolve as convolve
Agreed. Alternatively, the c-method could be renamed so that the python method in ext can be named convolve.
2. The test_convolution.py file is very instructive. It should be polished a bit. I think it would be worthwhile to add also scipy.signal.sepfir2d and cv2.sepFilter2D to the test.
3. I found the convolve speed in par with cv.convolve2d (it can be slower or faster depending on the kernel)
Thanks for testing the code.
I've got the code compiling on my system now, so I was able to clean up a few things. Could you update to what's currently on my skimage-convolution branch to check that it builds on your system? If not, what flags do you have to change/add to get it to compile?
P.S. If any one else is building this on OS X: ppc compatible builds is turned on by default (at least on my system). This should be turned off before building. Add the following line to ~/.profile, or just run it right before building:
export ARCH_FLAGS="-arch i386 -arch x86_64"
Can you explain why is this necessary?
In convolution/setup.py I also see you add "-ffast-math", which is a GCC-specific flag. It's better to remove it I think, it may give problems with other compilers.
On my system at least, running gcc will, by default, add "-arch ppc" along with i386 and x86_64. As far as I can tell, PPC doesn't support SSE, which is used by this implementation. The flag is left over from the original implementation. Removing "-ffast-math" works fine on my system. To be honest, I don't do much non-Python coding so I don't know the implications of adding/removing the flag. -Tony