diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2015-08-02 22:31:12 +0200 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-08-03 11:38:44 -0600 |
commit | 3ea9cc72aca9d74a360a11fb8cb57a8cf71055d2 (patch) | |
tree | 53e73543f65f510b0c3c651e316132c6e450707b /numpy/lib/arraypad.py | |
parent | fbf9bff63a27cdb00d8e73e39e0f9495a2e8238d (diff) | |
download | numpy-3ea9cc72aca9d74a360a11fb8cb57a8cf71055d2.tar.gz |
BLD: fix issue with POWL for Intel compilers on Windows.
Thanks to Intel (contact: Yolanda Chen) for this patch.
The Intel “powl” on Windows only supports 80 bits longdouble to keep
compatibility with Microsoft VC.
Microsoft VC only support 64 bits longdouble, from “C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\include\math.h”, powl is redefined as:
#define powl(x,y) ((long double)pow((double)(x), (double)(y)))
However in npy_math.c (generated from npy_math.c.src), this definition is
undefined even though HAVE_POWL is set for the Intel C compilers.
At line 384 of npy_math.c.src, we have::
#ifdef @kind@@c@
#undef @kind@@c@
#endif
#ifndef HAVE_@KIND@@C@
@type@ npy_@kind@@c@(@type@ x, @type@ y)
{
return (@type@) npy_@kind@((double)x, (double) y);
}
#endif
The expanded function generated in “npy_math.c” will look like::
#ifdef powl
#undef powl
#endif
#ifndef HAVE_POWL
npy_longdouble npy_powl(npy_longdouble x, npy_longdouble y)
{
return (npy_longdouble) npy_pow((double)x, (double) y);
}
#endif
Diffstat (limited to 'numpy/lib/arraypad.py')
0 files changed, 0 insertions, 0 deletions