[Digikam-devel] Customizing compiler options for a plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] Customizing compiler options for a plugin

Peter Heckert
Hi,

If I wanted to set the -ffast-math compiler option for the
Noisereduction plugin,
how should I do this?

Reason:
Converting float to int is rather expensive at least for the i386 family
of CPU's,
because the default rounding mode for the FPU must be temporarily changed.
In addition this will delete the pipeline in FPU.
This affects all (int) typecasts  and all  floor() or ceil() invocations.

There are other optimizations possible (e.g. do not expand float
constants to double)

Peter

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Digikam-devel] Customizing compiler options for a plugin

Gerhard Kulzer
On Saturday 29 April 2006 18:33, Peter Heckert wrote:
> Hi,
>
> If I wanted to set the -ffast-math compiler option for the
> Noisereduction plugin,
> how should I do this?

for example like this:
make CXXFLAGS='-O2 -march=pentium4 -ffast-math -mmmx -msse2'

> Reason:
> Converting float to int is rather expensive at least for the i386 family
> of CPU's,
> because the default rounding mode for the FPU must be temporarily changed.
> In addition this will delete the pipeline in FPU.
> This affects all (int) typecasts  and all  floor() or ceil() invocations.
>
> There are other optimizations possible (e.g. do not expand float
> constants to double)
>
> Peter
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Digikam-devel] Customizing compiler options for a plugin

Peter Heckert
Hi Gerhard,

Gerhard Kulzer wrote:
> On Saturday 29 April 2006 18:33, Peter Heckert wrote:
>  
>> Hi,
>>
>> If I wanted to set the -ffast-math compiler option for the
>> Noisereduction plugin,
>> how should I do this?
>>    

> for example like this:
> make CXXFLAGS='-O2 -march=pentium4 -ffast-math -mmmx -msse2
That wouldnt be portable...
And the Makefile is automake generated

Anyway, after some meditation I came to the conclusion better not to
modify or optimize the digikam plugin  other than for bugfixing in this
early state.

I trie to rewrite and optimize the gimp-plugin and encapsulate all image
put/get
operation into their own class. So when the filter should be ported to
digikam,
cinepaint or else, then only this interface class must be
modified/rewritten.
Because I have a dayjob and can only work on weekend or evening, this will
take some time...

regards,

Peter

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel