diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-04-20 20:20:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-20 20:20:46 +0300 |
commit | cd2e52ce9dc54b0199beba25bd5e02ce54d60963 (patch) | |
tree | 69654e1b8491320bfad736202ea161273cfb3972 /numpy/distutils/command/autodist.py | |
parent | 31e71d7ce8d447cb74b9fb83875361cf7dba4579 (diff) | |
parent | d3125fa94893af10597f3e0b07613c719940a543 (diff) | |
download | numpy-cd2e52ce9dc54b0199beba25bd5e02ce54d60963.tar.gz |
Merge pull request #13134 from r-devulap/logexp-simd
ENH: Use AVX for float32 implementation of np.exp & np.log
Diffstat (limited to 'numpy/distutils/command/autodist.py')
-rw-r--r-- | numpy/distutils/command/autodist.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/numpy/distutils/command/autodist.py b/numpy/distutils/command/autodist.py index d5e78963c..03fe0c64c 100644 --- a/numpy/distutils/command/autodist.py +++ b/numpy/distutils/command/autodist.py @@ -78,6 +78,26 @@ main() """ % (attribute, name) return cmd.try_compile(body, None, None) != 0 +def check_gcc_function_attribute_with_intrinsics(cmd, attribute, name, code, + include): + """Return True if the given function attribute is supported with + intrinsics.""" + cmd._check_compiler() + body = """ +#include<%s> +int %s %s(void) +{ + %s; + return 0; +} + +int +main() +{ + return 0; +} +""" % (include, attribute, name, code) + return cmd.try_compile(body, None, None) != 0 def check_gcc_variable_attribute(cmd, attribute): """Return True if the given variable attribute is supported.""" cmd._check_compiler() |