diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-08-13 18:16:26 -0600 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-09-04 21:45:48 +0200 |
commit | 175cea4dc0590ae520f32476ffb9129b8524bcad (patch) | |
tree | 6d48e045a3fbdb3b0a8088732ec8d62db5f11f33 /numpy/core/setup.py | |
parent | 2995792b90add947f8898ea36410473f37b94509 (diff) | |
download | numpy-175cea4dc0590ae520f32476ffb9129b8524bcad.tar.gz |
ENH: When cblas is available use it in descr->f->dot.
Importing _dotblas currently executes _dotblas.alterdot, which replaces
the default descr->f->dot function with a cblas based version for float,
double, complex float, and complex double data types. This PR changes
the default descr->f->dot to use cblas whenever it is available. After
this change, the alterdot and restoredot functions serve no purpose, so
are changed to do nothing and deprecated. Note that those functions were
already doing nothing when _dotblas was not available.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index b81374d14..4c2af5e62 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -846,15 +846,22 @@ def configuration(parent_package='',top_path=None): multiarray_src = [join('src', 'multiarray', 'multiarraymodule_onefile.c')] multiarray_src.append(generate_multiarray_templated_sources) + blas_info = get_info('blas_opt', 0) + if blas_info and ('HAVE_CBLAS', None) in blas_info.get('define_macros', []): + extra_info = blas_info + else: + extra_info = {} + config.add_extension('multiarray', - sources = multiarray_src + + sources=multiarray_src + [generate_config_h, - generate_numpyconfig_h, - generate_numpy_api, - join(codegen_dir, 'generate_numpy_api.py'), - join('*.py')], - depends = deps + multiarray_deps, - libraries = ['npymath', 'npysort']) + generate_numpyconfig_h, + generate_numpy_api, + join(codegen_dir, 'generate_numpy_api.py'), + join('*.py')], + depends=deps + multiarray_deps, + libraries=['npymath', 'npysort'], + extra_info=extra_info) ####################################################################### # umath module # |