diff options
| author | Sayed Adel <seiko@imavr.com> | 2020-06-13 18:15:25 +0200 |
|---|---|---|
| committer | Sayed Adel <seiko@imavr.com> | 2020-06-15 22:48:29 +0200 |
| commit | da21d28ef69e65c5bfef8dc22840fe16fec52540 (patch) | |
| tree | dcff74da7f8712f0328d3c1ed49527a0fd6f131d /numpy/distutils/checks/cpu_ssse3.c | |
| parent | 5345c2575a28fa2dfbbec83c99636669476c2745 (diff) | |
| download | numpy-da21d28ef69e65c5bfef8dc22840fe16fec52540.tar.gz | |
ENH: [1/7] enable multi-platform SIMD compiler optimizations
Implement new distutils class `CCompilerOpt`, used for handling
the CPU/hardware optimization, starting from parsing the
command arguments, to managing the relationship between the CPU baseline
and dispatch-able features, also generating the required C headers
and ending with compiling the sources with proper compiler's flags.
`CCompilerOpt` mainly used as a helper class for `CCompiler`,
and doesn't provide any runtime detection for the CPU features,
instead only focuses on the compiler side, but it generates
abstract C headers that can be used later for the final
runtime dispatching process.
Diffstat (limited to 'numpy/distutils/checks/cpu_ssse3.c')
| -rw-r--r-- | numpy/distutils/checks/cpu_ssse3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/distutils/checks/cpu_ssse3.c b/numpy/distutils/checks/cpu_ssse3.c new file mode 100644 index 000000000..ad0abc1e6 --- /dev/null +++ b/numpy/distutils/checks/cpu_ssse3.c @@ -0,0 +1,7 @@ +#include <tmmintrin.h> + +int main(void) +{ + __m128i a = _mm_hadd_epi16(_mm_setzero_si128(), _mm_setzero_si128()); + return (int)_mm_cvtsi128_si32(a); +} |
