Page 1 of 1

Detail of so bump

Posted: 2012-10-24T03:27:50-07:00
by broucaries
Could you please give use:
- detail of so bump
- why ?
- and the api change

thank you

Re: Detail of so bump

Posted: 2012-10-24T04:02:40-07:00
by magick
To increase performance primarily on smart phones we changed MagickRealType from double to float which required an SO bump. There is a corresponding performance boost on desktops as well. You can avoid any API incompatibility simply by restoring MagickRealType to double in magick/magick-type.h:
  • typedef double MagickRealType;

Re: Detail of so bump

Posted: 2012-10-24T04:31:52-07:00
by broucaries
Sorry but it could be slow on big arch.

According to C99 standard
The types float_t and double_t are intended to be the implementation’s most efficient types at least as wide as float and double, respectively.

So you should use float_t instaed of float.

Bastien

Re: Detail of so bump

Posted: 2012-10-24T04:35:50-07:00
by broucaries
Notice that you could not use it in an abi due to depends on FLT_EVAL_METHOD defined variable*. You need to test it a configure time by comparing float_t size against long double, double and float size

*The types float_t double_t
are floating types at least as wide as float and double, respectively, and such that double_t is at least as wide as float_t. If FLT_EVAL_METHOD equals 0, float_t and double_t are float and double, respectively; if FLT_EVAL_METHOD equals 1, they are both double; if FLT_EVAL_METHOD equals 2, they are both long double; and for other values of FLT_EVAL_METHOD, they are otherwise implementation-defined.178)

Re: Detail of so bump

Posted: 2012-10-24T04:51:20-07:00
by magick
Thanks for the tip, we're looking into float_t / double_t now. It will need to be conditional of course since not all compilers support C99.