numpy  2.0.0
src/private/npy_config.h
Go to the documentation of this file.
00001 #ifndef _NPY_NPY_CONFIG_H_
00002 #define _NPY_NPY_CONFIG_H_
00003 
00004 #include "config.h"
00005 #include "numpy/numpyconfig.h"
00006 #include "numpy/npy_cpu.h"
00007 #include "numpy/npy_os.h"
00008 
00009 /*
00010  * largest alignment the copy loops might require
00011  * required as string, void and complex types might get copied using larger
00012  * instructions than required to operate on them. E.g. complex float is copied
00013  * in 8 byte moves but arithmetic on them only loads in 4 byte moves.
00014  * the sparc platform may need that alignment for long doubles.
00015  * amd64 is not harmed much by the bloat as the system provides 16 byte
00016  * alignment by default.
00017  */
00018 #if (defined NPY_CPU_X86 || defined _WIN32)
00019 #define NPY_MAX_COPY_ALIGNMENT 8
00020 #else
00021 #define NPY_MAX_COPY_ALIGNMENT 16
00022 #endif
00023 
00024 /* blacklist */
00025 
00026 /* Disable broken Sun Workshop Pro math functions */
00027 #ifdef __SUNPRO_C
00028 
00029 #undef HAVE_ATAN2
00030 #undef HAVE_ATAN2F
00031 #undef HAVE_ATAN2L
00032 
00033 #endif
00034 
00035 /* Disable broken MS math functions */
00036 #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__MINGW32_VERSION)
00037 
00038 #undef HAVE_ATAN2
00039 #undef HAVE_ATAN2F
00040 #undef HAVE_ATAN2L
00041 
00042 #undef HAVE_HYPOT
00043 #undef HAVE_HYPOTF
00044 #undef HAVE_HYPOTL
00045 
00046 #endif
00047 
00048 #if defined(_MSC_VER) && (_MSC_VER == 1900)
00049 
00050 #undef HAVE_CASIN
00051 #undef HAVE_CASINF
00052 #undef HAVE_CASINL
00053 #undef HAVE_CASINH
00054 #undef HAVE_CASINHF
00055 #undef HAVE_CASINHL
00056 #undef HAVE_CATAN
00057 #undef HAVE_CATANF
00058 #undef HAVE_CATANL
00059 #undef HAVE_CATANH
00060 #undef HAVE_CATANHF
00061 #undef HAVE_CATANHL
00062 
00063 #endif
00064 
00065 
00066 /* Intel C for Windows uses POW for 64 bits longdouble*/
00067 #if defined(_MSC_VER) && defined(__INTEL_COMPILER)
00068 #if defined(HAVE_POWL) && (NPY_SIZEOF_LONGDOUBLE == 8)
00069 #undef HAVE_POWL
00070 #endif
00071 #endif /* defined(_MSC_VER) && defined(__INTEL_COMPILER) */
00072 
00073 /* powl gives zero division warning on OS X, see gh-8307 */
00074 #if defined(HAVE_POWL) && defined(NPY_OS_DARWIN)
00075 #undef HAVE_POWL
00076 #endif
00077 
00078 /* Disable broken gnu trig functions */
00079 #if defined(HAVE_FEATURES_H)
00080 #include <features.h>
00081 
00082 #if defined(__GLIBC__)
00083 #if !__GLIBC_PREREQ(2, 18)
00084 
00085 #undef HAVE_CASIN
00086 #undef HAVE_CASINF
00087 #undef HAVE_CASINL
00088 #undef HAVE_CASINH
00089 #undef HAVE_CASINHF
00090 #undef HAVE_CASINHL
00091 #undef HAVE_CATAN
00092 #undef HAVE_CATANF
00093 #undef HAVE_CATANL
00094 #undef HAVE_CATANH
00095 #undef HAVE_CATANHF
00096 #undef HAVE_CATANHL
00097 #undef HAVE_CACOS
00098 #undef HAVE_CACOSF
00099 #undef HAVE_CACOSL
00100 #undef HAVE_CACOSH
00101 #undef HAVE_CACOSHF
00102 #undef HAVE_CACOSHL
00103 
00104 #endif /* __GLIBC_PREREQ(2, 18) */
00105 #endif /* defined(__GLIBC_PREREQ) */
00106 
00107 #endif /* defined(HAVE_FEATURES_H) */
00108 
00109 #endif