Skip to content

Commit

Permalink
Merge pull request #283 from cgohlke/patch-1
Browse files Browse the repository at this point in the history
Fix segaults with VML; Use VML functions for ceil and floor
  • Loading branch information
robbmcleod committed Sep 14, 2017
2 parents 50e9310 + c973e8b commit 3090ac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions numexpr/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ FUNC_FF(FUNC_EXP_FF, "exp_ff", expf, expf2, vsExp)
FUNC_FF(FUNC_EXPM1_FF, "expm1_ff", expm1f, expm1f2, vsExpm1)
FUNC_FF(FUNC_ABS_FF, "absolute_ff", fabsf, fabsf2, vsAbs)
FUNC_FF(FUNC_CONJ_FF, "conjugate_ff",fconjf, fconjf2, vsConj)
FUNC_FF(FUNC_CEIL_FF, "ceil_ff", ceilf, ceilf2, NULL)
FUNC_FF(FUNC_FLOOR_FF, "floor_ff", floorf, floorf2, NULL)
FUNC_FF(FUNC_CEIL_FF, "ceil_ff", ceilf, ceilf2, vsCeil)
FUNC_FF(FUNC_FLOOR_FF, "floor_ff", floorf, floorf2, vsFloor)
FUNC_FF(FUNC_FF_LAST, NULL, NULL, NULL, NULL)
#ifdef ELIDE_FUNC_FF
#undef ELIDE_FUNC_FF
Expand Down Expand Up @@ -78,8 +78,8 @@ FUNC_DD(FUNC_EXP_DD, "exp_dd", exp, vdExp)
FUNC_DD(FUNC_EXPM1_DD, "expm1_dd", expm1, vdExpm1)
FUNC_DD(FUNC_ABS_DD, "absolute_dd", fabs, vdAbs)
FUNC_DD(FUNC_CONJ_DD, "conjugate_dd",fconj, vdConj)
FUNC_DD(FUNC_CEIL_DD, "ceil_dd", ceil, NULL)
FUNC_DD(FUNC_FLOOR_DD, "floor_dd", floor, NULL)
FUNC_DD(FUNC_CEIL_DD, "ceil_dd", ceil, vdCeil)
FUNC_DD(FUNC_FLOOR_DD, "floor_dd", floor, vdFloor)
FUNC_DD(FUNC_DD_LAST, NULL, NULL, NULL)
#ifdef ELIDE_FUNC_DD
#undef ELIDE_FUNC_DD
Expand Down
2 changes: 2 additions & 0 deletions numexpr/necompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"conjugate",
"arctan2",
"fmod",
"ceil",
"floor"
]

# Final addtions for Python 3 (mainly for PyTables needs)
Expand Down

0 comments on commit 3090ac4

Please sign in to comment.