38 Commits

Author SHA1 Message Date
lshaw8317 7cadd0f93b Revert "Merge pull request #534 from jorenham/static-typing"
This reverts commit bce38b4317, reversing
changes made to cd730c826f.
2025-10-13 15:50:59 +02:00
jorenham 49bc1816e3 run isort 2025-09-24 23:43:03 +02:00
jorenham a761d4e51f annotate __init__.py 2025-09-24 17:25:17 +02:00
jorenham 65ad97ecb1 annotate utils 2025-09-24 16:53:36 +02:00
pre-commit-ci[bot] 9dad87bd2c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-03-06 18:54:56 +00:00
Emma Ai c4f527de1b isolate dict between contexts 2024-09-12 10:57:28 +00:00
Emma Ai 6c2289ec14 support threading with context aware dict 2024-08-26 06:26:19 +00:00
Francesc Alted c7f3d57e43 We are in 2024, so raise the 'safe' limit to 16 threads 2024-05-30 18:25:03 +02:00
Francesc Alted 23466aff6b Do not warn if OMP_NUM_THREAD set. Fixes #344. 2024-02-19 06:11:13 +01:00
Patrick Hoefler e4c28469ec Update utils.py 2024-02-10 12:27:24 +01:00
Patrick Hoefler f9e33f6528 Update 2024-02-09 10:02:55 +01:00
Patrick Hoefler fb0919cc78 Avoid erroring when OMP_NUM_THREADS is empty string 2024-02-02 23:47:14 +00:00
Daniel Paley c2926560c8 Check platform.machine() at install time (fixes #399) 2022-02-06 17:23:17 -05:00
Robert McLeod 99ddb12b18 Remove support for Python 2.7 and 3.5; add support for Python 3.10 2021-11-08 19:54:18 -08:00
Robert McLeod f9cd0666ee Revert get_vml_num_threads to return None when not installed 2020-09-23 18:49:10 -07:00
Robert McLeod c8c27a930b Add a utility function get_num_threads 2020-09-23 18:44:31 -07:00
Nigel Delaney 17d0b1928d Add Getter for VML Thread Count
Adds `get_vml_num_threads` to match `set_vml_num_threads`
2020-01-13 18:38:20 -08:00
Robert McLeod 7c2ef387d8 Restore safe limit of 8 threads if env vars not set 2019-01-28 11:39:25 -08:00
Robert McLeod 0b2eaa6f75 Remove thread max if using OMP_NUM_THREADS 2018-09-28 08:53:09 -07:00
Robert McLeod e8f05b26e6 Remove thread max if using OMP_NUM_THREADS 2018-09-28 08:52:04 -07:00
Mike Toews 6cfedb427d Handle ValueError from non-number environment vars 2018-09-28 13:56:59 +12:00
Robert McLeod 694a838a5a Control max threads with 'NUMEXPR_MAX_THREADS' environment variable 2018-04-10 11:31:17 -07:00
Stephan Erb c683d387db Support OMP_NUM_THREADS as fallback config variable 2015-05-05 15:27:15 +02:00
Stephan Erb 16ebf14586 Extract derivation of num threads into function 2015-05-05 15:16:24 +02:00
Francesc Alted 224ac6f872 MKL_VML -> MKL_DOMAIN_VML because the former is deprecated in MKL 2015-04-14 14:33:28 +02:00
Francesc Alted 6e59ed5f0e Reformatted code through PyCharm. 2014-04-18 10:53:51 +02:00
Antonio Valentino ccf15d693a Fix py3k incompatibilities in python code 2012-04-21 22:13:05 +02:00
Antonio Valentino b83e68bdb3 Switch from PyString to PyBytes API 2012-04-15 13:18:11 +02:00
Francesc Alted f776d7a770 Added licence boilerplates with proper copyright information. Solves #62. 2011-11-27 12:05:29 +01:00
Francesc Alted 81d4b5bec1 The number of VML threads is initially set to 1.
When compiled with VML support, the number of threads is set to 1
for VML core, and to the number of cores for the native pthreads
implementation.  This leads to better performance.  Closes #39.

The ``set_num_threads`` now returns the number of previous thread
setting, as stated in the docstrings.
2010-11-28 09:48:45 +00:00
Francesc Alted 99c0ede4c1 The temporaries are created dinamically now.
This are special registers in VM because they need to be unique for each
thread.  Creating them in initialization time is a big loss of space,
because the NumExpr instances are cached for speed.

We are loosing a bit of performance with this, but I think the memory
savings pay for this.
2010-07-31 14:43:29 +00:00
Francesc Alted 488c7a9205 Fixed the bug exposed in bug.py.
The problem was that the internal buffers in expressions need to be refreshed when the
number of threads changes.  I delete now the cache for expression each time the number of
threads is changed.

The bug.py has been migrated to a test case in the test suite.
2010-07-30 22:24:33 +00:00
Francesc Alted 00d0a4428d Added more info about preferred parallelizer in Numexpr. 2010-07-30 16:11:29 +00:00
Francesc Alted 33c297ddf2 Merged branch multithreaded into trunk. 2010-07-30 14:51:38 +00:00
Francesc Alted 047d5a845d Remove a percentage of entries in CacheDict instead of a fixed number. 2009-02-11 09:45:00 +00:00
Francesc Alted 0282375bd8 Added suport for querying the version of the VML/MKL library.
Added `print_versions()` function for easily query the versions of software
that numexpr relies on.

Documentation updated accordingly.  Announcement updated as well and
almost ready for release 1.2.
2009-02-10 13:50:34 +00:00
Francesc Alted 5248960b0a Added a new CacheDict class for caching variable names and compiled
expressions.
2009-02-10 12:04:07 +00:00
Francesc Alted de26c112c9 Merged in the vml_support branch. Closes issue #9. 2009-02-09 18:42:22 +00:00