On Fri, Dec 30, 2011 at 8:05 PM, Tony Yu <tsyu80@gmail.com> wrote:
On Fri, Dec 30, 2011 at 1:19 PM, Ralf Gommers <ralf.gommers@googlemail.com
wrote:
On Fri, Dec 30, 2011 at 5:46 PM, Tony Yu <tsyu80@gmail.com> wrote:
On Fri, Dec 30, 2011 at 8:20 AM, Nadav Horesh <nadavh.horesh@gmail.com>wrote:
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)
Nadav
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?
-Tony
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.
Ralf
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.
That's true. I can't tell for sure, but it seems that this code is not optional. Meaning PPC is unsupported, and the ARCH_FLAGS need to be defined on OS X. I'm only a very occasional user now so it doesn't bother me too much, but isn't this a large penalty for the benefit you get?
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.
It's very likely to give problems with unusual (or even Intel) compilers I think. Ralf
participants (1)
-
Ralf Gommers