fellow Debian user, thanks for giving it a test and pointing out the problems. I did most of the development in Visual Studio, so there might be some incompatibilities.
Unfortunately, the unit test isn't very well integrated. I just saw now there's a Google unit test, but I've never used that. For now, I guess you can,
1. rename the test function, main() in nr-filter-gaussian.cpp and call it from the real main() Also #define UNIT_TEST
or
2. compile nr-filter-gaussian.cpp as a standalone program: a. #define UNIT_TEST b. compile just that file to an EXE. This could be a little difficult because you'll need to strip out some unused functions or else there will be a ton of link errors. You'll also need to specify the libraries (at least -lcairo -lpng16). You can see the compile command with make VERBOSE=1 and use that as a starting point.
On Mon, Sep 19, 2016 at 9:52 AM, Alexander Brock <a.brock@...2965...> wrote:
On 09/19/2016 02:25 PM, Yale Zhang wrote:
I'm proud to announce that I have completed vectorizing both the IIR and FIR filters. Speed ups are about 5x for IIR and ~20x for FIR (see spreadsheet). The code is a monstrosity, but given all the different cases ( {FIR, IIR} x {int16, float, double} x {RGBA, grayscale} as Jasper pointed out, it's expected. Earlier, I had only worked on the IIR, RGBA case, so it wasn't complete. It's unfortunate I let it languish for 3 years, but now hopefully, everyone can get a smoother experience.
Cool :-)
Please test it out and send some feedback and a path for checking in.
Here's my experience with your patch on Debian stretch (native, latest upgrades installed), gcc version 6.1.1 20160802 (Debian 6.1.1-11):
- I needed to remove the "-DWIN32" flag since that triggered usage of
the "Sleep" function which lead to a compiler error
- I needed to place the keyword "inline" before the four
PartialVectorMask* functions in lines 983, 988, 994, 1000 of file nr-filter-gaussian.cpp This problem was the reason:
http://stackoverflow.com/questions/13472341/inlining-failed-function-body-ca...
After that it compiled.
A unit test & benchmark function is included. The accuracy is always +- 1 intensity level, which should be quite safe.
To build it, please add this to your cmake command: -DCMAKE_CXX_FLAGS="-DWIN32 -mavx2 -mfma -fpermissive -flax-vector-conversions"
You'll also need to turn on -std=c++14 if compiling the unit test & benchmark
I ran cmake with -DCMAKE_CXX_FLAGS="-mavx2 -mfma -fpermissive -flax-vector-conversions -std=c++14".
How can I run the test and the benchmark? In the "bin" directory these files showed up: attributes-test, color-profile-test, dir-util-test inkscape, inkview, object-set-test, sp-object-test
Best Regards, Alexander
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel