Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
13 Views

floating-point speculation

Hi all,

I am writing a bicubic interpolation to perform image rotation, and I am encountering a bug that may be due to the compiler, though I am not sure. Essentially, my routine works fine in debug, and also in release but only if floating-point speculation is off. If it is on, then I start to see artefacts in the image. I am not knowledgeable enough on the topic of fp model and speculation to be sure of what is going on. Can somebody shed some lights on the topic? Any ideas/suggestions/comments more than welcome.

A


PS: I know IPP has such a routine, but I need to have portable code, plus I can achieve higher speed with a fraction of the memory anyway, so really no point of using IPP.
0 Kudos
1 Reply
Highlighted
Black Belt
13 Views

This doesn't entirely make sense, unless speculation has side effects. Does -fp-model source work?
The terminology seems to refer back to a paper for sale on the ACM site. Presumably, it means that some operations may be moved outside your if(), possibly enabling further "optimizations," which, under -fp-model fast, aren't required to conform to C standard.
0 Kudos