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/bscript | |
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/bscript')
-rw-r--r-- | numpy/core/bscript | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/numpy/core/bscript b/numpy/core/bscript index 416e16524..3306c5341 100644 --- a/numpy/core/bscript +++ b/numpy/core/bscript @@ -488,14 +488,22 @@ def pre_build(context): pjoin('src', 'multiarray', 'usertypes.c')] else: sources = extension.sources + + use = 'npysort npymath' + defines = ['_FILE_OFFSET_BITS=64', + '_LARGEFILE_SOURCE=1', + '_LARGEFILE64_SOURCE=1'] + + if bld.env.HAS_CBLAS: + use += ' CBLAS' + defines.append('HAVE_CBLAS') + includes = ["src/multiarray", "src/private"] return context.default_builder(extension, includes=includes, source=sources, - use="npysort npymath", - defines=['_FILE_OFFSET_BITS=64', - '_LARGEFILE_SOURCE=1', - '_LARGEFILE64_SOURCE=1'] + use=use, + defines=defines ) context.register_builder("multiarray", builder_multiarray) |