| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |\
| |
| | |
ENH allow for specifying CPU features to enable via `NPY_ENABLE_CPU_FEATURES` environment variable
|
| | | |
|
| |\ \
| |/
|/| |
ENH: Extend the functionlty of C++ type `np::Half`
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- optimize float/double conversions on x86, requires for now
raising up the baseline features to `f16c` at least
during the build.
- optimize float/double conversions on ppc64le, requires for now
raising up the baseline features to `VSX3` at least
during the build.
- Brings `np::Half` to npymath
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables writing np.array(some_object, dtype=type(np.dtype('i'))). This
is a follow-on from https://github.com/numpy/numpy/pull/23154, see that PR
for more details.
I had to add a new include to `ctors.h` to bring in the definition of the
`npy_dtype_info` struct. Since `ctors.h` is included in many other files inside
numpy, I found that I needed to modify fewer includes across numpy if I moved
the definition of `npy_dtype_info` to `common.h` from `descriptor.h`. The new
includes of `common.h` are needed to support later includes of `ctors.h` in
those files. If anyone has an alternate place to put `npy_dtype_info` that would
cause less churn of includes I'd love to hear about it.
I spent a bunch of time tweaking the reference counts. I'm reasonably confident
this is correct but not 100%, an additional careful pass over the reference
count logic from a reviewer would be very appreciated.
I could have made `_PyArray_FromAny` and `_PyArray_CheckFromAny` take just a
`npy_dtype_info` struct, but I found it made the reference count logic more
complicated, since `PyArray_FromAny` and `PyArray_CheckFromAny` steal the
reference to the descriptor they are passed and I needed to conserve that
behavior. Also both functions support passing in a `NULL` pointer for the
descriptor and I needed to maintain that behavior as well.
The change to `ucsnarrow.h` fixes a preexisting conflict with the prototype
in `ucsnarrow.c` that triggered a compiler error while I was working on this.
|
| |\
| |
| | |
SIMD: Get rid of attribute-based CPU dispatching
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
| |
call fails
|
| |\
| |
| | |
BLD: Add compile and runtime checks for AVX512_SPR
|
| | | |
|
| |\ \
| | |
| | | |
ENH: Vectorize quicksort for 16-bit and 64-bit dtype using AVX512
|
| | | |
| | |
| | |
| | | |
To guarantee of having #defs NPY_HAVE_[CPU features] in the scope
|
| | |/
| |
| |
| |
| |
| | |
This patch initializes new C++ headers and also brings new
namespace `np::` to break away from the current approach
of using C++ which tends not to be drawn into modernity.
|
| | | |
|
| |\ \
| |/
|/| |
ENH: re-implement SIMD kernels of complex operations
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
access for complex load/store
summarized as follows:
64-bit contiguous partial load/store over 32-bit lane
npyv_load2_till_u32, npyv_load2_till_s32, npyv_load2_till_f32
npyv_load2_tillz_u32, npyv_load2_tillz_s32, npyv_load2_tillz_f32
npyv_store2_till_u32, npyv_store2_till_s32, npyv_store2_till_f32
128-bit contiguous partial load/store over 64-bit lane
npyv_load2_till_u64, npyv_load2_till_s64, npyv_load2_till_f64
npyv_load2_tillz_u64, npyv_load2_tillz_s64, npyv_load2_tillz_f64
npyv_store2_till_u64, npyv_store2_till_s64, npyv_store2_till_f64
64-bit non-contiguous load/store over 32-bit stride
npyv_loadn2_u32, npyv_loadn2_s32, npyv_loadn2_f32
npyv_storen2_u32, npyv_storen2_s32, npyv_storen2_f32
128-bit non-contiguous load/store over 64-bit stride
npyv_loadn2_u64, npyv_loadn2_s64, npyv_loadn2_f64
npyv_storen2_u64, npyv_storen2_s64, npyv_storen2_f64
64-bit non-contiguous partial load/store over 32-bit stride
npyv_loadn2_till_u32, npyv_loadn2_till_s32, npyv_loadn2_till_f32
npyv_loadn2_tillz_u32, npyv_loadn2_tillz_s32, npyv_loadn2_tillz_f32
npyv_storen2_till_u32, npyv_storen2_till_s32, npyv_storen2_till_f32
128-bit non-contiguous partial load/store over 64-bit stride
npyv_loadn2_till_u64, npyv_loadn2_till_s64, npyv_loadn2_till_f64
npyv_loadn2_tillz_u64, npyv_loadn2_tillz_s64, npyv_loadn2_tillz_f64
npyv_storen2_till_u64, npyv_storen2_till_s64, npyv_storen2_till_f64
2 channels de-interlave/interleave contiguous load/store for all data types
npyv_load_##sfx##x2, npyv_store_##sfx##x2
|
| | |
| |
| |
| |
| | |
shuffle intrinsics support 32-bit/64-bit vector data types,
unzip(deinterleave) intrinsics supports all data types.
|
| |/
|
|
|
| |
Updates the header file and accept as well as export boolean now that
the header includes a definition for it.
|
| | |
|
| |
|
|
|
|
| |
np.sin(), np.cos() are giving erroneous result for float32 (VXE)
This PR is fixing `npyv_s32 npyv__trunc_s32_f32(npyv_f32 a)`
to resolve the issue.
|
| | |
|
| | |
|
| |\
| |
| | |
ENH: Properly support FreeBSD/powerpc64
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. FreeBSD uses elf_aux_info() instead of getauxval.
2. Switch to using compiler macros for detecting POWER platform
FreeBSD sets the machine name (what uname -m prints) on all powerpc* to
just powerpc. To identify actual architecture, uname -p should be used,
but this is not present in uname() function. Thus, the only way to
correctly detect platform is to use what uname prints and also check
compiler defines.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Providing non-signaling comparison intrinsics that guarantee
no FP invalid exception in case of qNaN sounds great but it
cost unacceptable extra intrinsics on ppc64le(VSX) and x86(SSE).
Therefore, an integer definition #NPY_SIMD_CMPSIGNAL has been
provided instead to differenate between SIMD extensions
that support only supports signaling comparison.
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before SSE41, there were no native instructions for rounding
operations on double precision. We usually emulate it by assuming
that the `MXCR` register is set to rounding, adding a
large number `2^52` to `X` and then subtracting it back to
eliminate any excess precision as long as `|X|` is less than `2^52`
otherwise returns `X.`
The current emulated intrinics `npyv_[rint,floor, ceil, trunc]_f64`
was not checking whether `|x|` equal or large `2^52` which leads
to losing accuracy on large numbers.
|
| | |
|
| |
|
|
| |
Closes gh-22100
|
| |
|
|
|
| |
assert() only takes one argument.
This was recently introduced, in commit 4156ae260 (gh-21793)
|
| | |
|
| |\
| |
| | |
SIMD: Improve the performance of NEON vector initializer
|
| | |
| |
| |
| |
| |
| | |
Using load over stack has a bad impact on the compiler static analysis
compared with direct compiler initlizer via curly brace which
is supported by both gcc and clang.
|
| | |
| |
| |
| |
| | |
npyv_any_##SFX: returns true if any of the elements is not equal to zero
npyv_all_##SFX: returns true if all elements are not equal to zero
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
max/min that reverse IEC 60559's NaN beahvior(propagates NaNs) for float data types
npyv_maxn_##SFX
npyv_minn_##SFX
max/min reduction for all float and integer vector data types
npyv_reduce_max_##SFX
npyv_reduce_min_##SFX
max/min reduction supports IEC 60559 for float data types
npyv_reduce_maxp_##SFX
npyv_reduce_minp_##SFX
max/min reduction reverse IEC 60559's NaN beahvior(propagates NaNs) for float data types
npyv_reduce_maxn_##SFX
npyv_reduce_minn_##SFX
also, this patch implements new intrinsics to extract the first vector lane:
npyv_extract0_##SFX
npyv_extract0_##SFX
|
| | |
|
| | |
|
| | |
|
| | |
|