I'm using Intel IPP v7.0.205. When I call ippiSqrt_32f_C1IR for image containig zero pixels I occasionally encounter floating point exception _EM_INVALID. The excpetion is thrown only on several computers. The answer is always correct and sqrt is properly computed for an image. I'm currently forced to disable this error with _controlfp_s function. I'm sure an image contains no negative pixels.
The same problem exists for ippiExp_32f_C1IR applied for image with -Inf pixels. The result is correctly computed as zero, but the exception is occasionally thrown.
I tested this under Windows 7 x64, Visual Studio 2010 SP1 Professional.
Sergey Kostrov wrote:
- Did you try to use _control87 CRT-function instead? ( it is similar to _controlfp_s but I would try anyway )
- Could you provide a test-case?
- You could also try to use _MM_SET_EXCEPTION_STATE macro from xmmintrin.h header file ( macro provides direct control of SSE exceptions )
_controlfp_s works fine and I see no reason for me to replace it with anything else.
Unfortunately, the bug is not reproduced on a small test-case I've created. Seems like I need to slice and cut my original project to remove all the unnecessary stuff. I don't have time for that at the moment. Could you provide any details on what Gennady Fedorov said?