[FFmpeg-devel] [PATCH 2/2] configure: Use intel math.h header.

Timothy Gu timothygu99 at gmail.com
Thu May 8 01:49:36 CEST 2014


On May 7, 2014 10:41 AM, "Matt Oliver" <protogonoi at gmail.com> wrote:
>
> On 7 May 2014 23:52, Matt Oliver <protogonoi at gmail.com> wrote:
> Due to some issues raised about this patches sister patch [1/2] I have
come
> up with a cleaner alternative. Its still based on 3) from previous email
> but it does it by creating a wrapper math.h that catches all header
> includes and then routes those to the icl header where appropriate. It
also
> can then remove the clashes with 'I' and 'complex' that now makes the
> previous sister patch redundant. This makes the patch alot cleaner and
less
> obtrusive (only affects icl) and fixes a fatal bug with icl and msvc12.

Sounds reasonable. Just curious, with this patch, how much faster is ICL
compared to MSVC?

> +#ifdef __INTEL_COMPILER
> +    // Use the Intel Math library. This provide Intel processor
> optimized functions.
+    //  This also avoids an error with the msvc math.h definition of NAN
> found in msvc12.
> +#   include <mathimf.h>

How about Linux? Intel Math Library is available for Linux too.

> +    // The Intel header automatically includes defines used with
complex.h
> +    //  that interfere with normal code and need to be removed.
> +#   undef I
> +#   undef complex

> +#elif defined(_MSC_VER)
> +#   include <../include/math.h>

What is this ../include/math.h? Also from the configure settings this
header is not included by MSVC so what is the point of this?

> +#else
> +#   error This header should only be used with native Windows
> compilers
> +#endif

Timothy


More information about the ffmpeg-devel mailing list