Commit 2bdac429 authored by Karl Wette's avatar Karl Wette

VectorMath: remove support for SSE1

- VectorMath_SSEx.c requires _mm_add_pd() which is an SSE2 intrinsic
  (defined in emmintrin.h) and therefore cannot be build on platforms
  with support for only SSE1 (e.g. at least some i386 systems)
- Raise explicit error in VectorMath_SSEx.c if __SSE2__ is not defined
- Remove SSE1 from supported instruction sets in VectorMath_internal.c
  and VectorMath.c
- Remove SSE1-specific build of VectorMath module in Makefile.am
parent ddc56386
Pipeline #88799 passed with stages
in 156 minutes and 23 seconds
......@@ -23,13 +23,6 @@ noinst_HEADERS = \
libvectorops_la_LIBADD =
if HAVE_SSE_COMPILER
noinst_LTLIBRARIES += libvectormath_sse.la
libvectorops_la_LIBADD += libvectormath_sse.la
libvectormath_sse_la_SOURCES = VectorMath_SSEx.c
libvectormath_sse_la_CFLAGS = $(AM_CFLAGS) $(SSE_CFLAGS)
endif
if HAVE_SSE2_COMPILER
noinst_LTLIBRARIES += libvectormath_sse2.la
libvectorops_la_LIBADD += libvectormath_sse2.la
......
......@@ -125,34 +125,34 @@ DEFINE_ALIGNED_VECT_API(COMPLEX16);
#define EXPORT_VECTORMATH_S2S(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL4, (REAL4 *out, const REAL4 *in, const UINT4 len), (out, in, len), __VA_ARGS__ )
EXPORT_VECTORMATH_S2S(Sin, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2S(Cos, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2S(Exp, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2S(Log, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2S(Sin, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_S2S(Cos, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_S2S(Exp, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_S2S(Log, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_S2S(Round, AVX2, AVX, NONE, NONE)
// ---------- define exported vector math functions with 1 REAL4 vector input to 2 REAL4 vector outputs (S2SS) ----------
#define EXPORT_VECTORMATH_S2SS(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL4, (REAL4 *out1, REAL4 *out2, const REAL4 *in, const UINT4 len), (out1, out2, in, len), __VA_ARGS__ )
EXPORT_VECTORMATH_S2SS(SinCos, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2SS(SinCos2Pi, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_S2SS(SinCos, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_S2SS(SinCos2Pi, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 2 REAL4 vector inputs to 1 REAL4 vector output (SS2S) ----------
#define EXPORT_VECTORMATH_SS2S(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL4, (REAL4 *out, const REAL4 *in1, const REAL4 *in2, const UINT4 len), (out, in1, in2, len), __VA_ARGS__ )
EXPORT_VECTORMATH_SS2S(Add, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_SS2S(Sub, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_SS2S(Multiply, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_SS2S(Max, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_SS2S(Add, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_SS2S(Sub, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_SS2S(Multiply, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_SS2S(Max, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 1 REAL4 scalar, 1 REAL4 vector inputs to 1 REAL4 vector output (sS2S) ----------
#define EXPORT_VECTORMATH_sS2S(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL4, (REAL4 *out, REAL4 scalar, const REAL4 *in, const UINT4 len), (out, scalar, in, len), __VA_ARGS__ )
EXPORT_VECTORMATH_sS2S(Scale, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_sS2S(Shift, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_sS2S(Scale, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_sS2S(Shift, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 2 REAL4 vector inputs to 1 UINT4 scalar and 1 UINT4 vector output (SS2uU) ----------
#define EXPORT_VECTORMATH_SS2uU(NAME, ...) \
......@@ -170,31 +170,31 @@ EXPORT_VECTORMATH_sS2uU(FindScalarLessEqual, AVX2, SSSE3, NONE, NONE)
#define EXPORT_VECTORMATH_dD2D(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL8, (REAL8 *out, REAL8 scalar, const REAL8 *in, const UINT4 len), (out, scalar, in, len), __VA_ARGS__ )
EXPORT_VECTORMATH_dD2D(Scale, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_dD2D(Shift, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_dD2D(Scale, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_dD2D(Shift, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 2 REAL8 vector inputs to 1 REAL8 vector output (DD2D) ----------
#define EXPORT_VECTORMATH_DD2D(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## REAL8, (REAL8 *out, const REAL8 *in1, const REAL8 *in2, const UINT4 len), (out, in1, in2, len), __VA_ARGS__ )
EXPORT_VECTORMATH_DD2D(Add, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_DD2D(Sub, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_DD2D(Multiply, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_DD2D(Add, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_DD2D(Sub, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_DD2D(Multiply, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_DD2D(Max, AVX2, AVX, NONE, NONE)
// ---------- define exported vector math functions with 2 COMPLEX8 vector inputs to 1 COMPLEX8 vector output (CC2C) ----------
#define EXPORT_VECTORMATH_CC2C(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## COMPLEX8, (COMPLEX8 *out, const COMPLEX8 *in1, const COMPLEX8 *in2, const UINT4 len), (out, in1, in2, len), __VA_ARGS__ )
EXPORT_VECTORMATH_CC2C(Multiply, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_CC2C(Add, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_CC2C(Multiply, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_CC2C(Add, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 1 COMPLEX8 scalar and 1 COMPLEX8 vector inputs to 1 COMPLEX8 vector output (cC2C) ----------
#define EXPORT_VECTORMATH_cC2C(NAME, ...) \
EXPORT_VECTORMATH_ANY( NAME ## COMPLEX8, (COMPLEX8 *out, COMPLEX8 scalar, const COMPLEX8 *in, const UINT4 len), (out, scalar, in, len), __VA_ARGS__ )
EXPORT_VECTORMATH_cC2C(Scale, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_cC2C(Shift, AVX2, AVX, SSE2, SSE)
EXPORT_VECTORMATH_cC2C(Scale, AVX2, AVX, SSE2, NONE)
EXPORT_VECTORMATH_cC2C(Shift, AVX2, AVX, SSE2, NONE)
// ---------- define exported vector math functions with 1 REAL8 vector input to 1 REAL8 vector output (D2D) ----------
#define EXPORT_VECTORMATH_D2D(NAME, ...) \
......
......@@ -29,9 +29,10 @@
#include "VectorMath_internal.h"
#ifdef __SSE2__
#define USE_SSE2
#ifndef __SSE2__
#error "VectorMath_SSEx.c requires SIMD instruction set SSE2 or higher"
#endif
#define USE_SSE2
#include "VectorMath_sse_mathfun.h"
......
......@@ -53,34 +53,34 @@
#define DECLARE_VECTORMATH_S2S(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL4, ( REAL4 *out, const REAL4 *in, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_S2S(Sin, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2S(Cos, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2S(Exp, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2S(Log, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2S(Sin, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_S2S(Cos, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_S2S(Exp, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_S2S(Log, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_S2S(Round, AVX2, AVX, NONE, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 1 REAL4 vector input to 2 REAL4 vector outputs (S2SS) */
#define DECLARE_VECTORMATH_S2SS(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL4, ( REAL4 *out1, REAL4 *out2, const REAL4 *in, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_S2SS(SinCos, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2SS(SinCos2Pi, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_S2SS(SinCos, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_S2SS(SinCos2Pi, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 2 REAL4 vector inputs to 1 REAL4 vector output (SS2S) */
#define DECLARE_VECTORMATH_SS2S(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL4, ( REAL4 *out, const REAL4 *in1, const REAL4 *in2, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_SS2S(Add, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_SS2S(Sub, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_SS2S(Multiply, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_SS2S(Max, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_SS2S(Add, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_SS2S(Sub, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_SS2S(Multiply, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_SS2S(Max, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 1 REAL4 scalar and 1 REAL4 vector input to 1 REAL4 vector output (sS2S) */
#define DECLARE_VECTORMATH_sS2S(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL4, ( REAL4 *out, REAL4 scalar, const REAL4 *in, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_sS2S(Shift, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_sS2S(Scale, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_sS2S(Shift, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_sS2S(Scale, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 2 REAL4 vector inputs to 1 UINT4 scalar and 1 UINT4 vector output (SS2uU) */
#define DECLARE_VECTORMATH_SS2uU(NAME, ...) \
......@@ -99,31 +99,31 @@ DECLARE_VECTORMATH_sS2uU(FindScalarLessEqual, AVX2, SSSE3, NONE, NONE)
#define DECLARE_VECTORMATH_dD2D(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL8, ( REAL8 *out, REAL8 scalar, const REAL8 *in, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_dD2D(Scale, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_dD2D(Shift, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_dD2D(Scale, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_dD2D(Shift, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 2 REAL8 vector inputs to 1 REAL8 vector output (DD2D) */
#define DECLARE_VECTORMATH_DD2D(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## REAL8, ( REAL8 *out, const REAL8 *in1, const REAL8 *in2, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_DD2D(Add, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_DD2D(Sub, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_DD2D(Multiply, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_DD2D(Add, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_DD2D(Sub, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_DD2D(Multiply, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_DD2D(Max, AVX2, AVX, NONE, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 2 COMPLEX8 vector inputs to 1 COMPLEX8 vector output (CC2C) */
#define DECLARE_VECTORMATH_CC2C(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## COMPLEX8, ( COMPLEX8 *out, const COMPLEX8 *in1, const COMPLEX8 *in2, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_CC2C(Multiply, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_CC2C(Add, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_CC2C(Multiply, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_CC2C(Add, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 1 COMPLEX8 scalar and 1 COMPLEX8 vector input to 1 COMPLEX8 vector output (cC2C) */
#define DECLARE_VECTORMATH_cC2C(NAME, ...) \
DECLARE_VECTORMATH_ANY( NAME ## COMPLEX8, ( COMPLEX8 *out, COMPLEX8 scalar, const COMPLEX8 *in, const UINT4 len ), __VA_ARGS__ )
DECLARE_VECTORMATH_cC2C(Scale, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_cC2C(Shift, AVX2, AVX, SSE2, SSE)
DECLARE_VECTORMATH_cC2C(Scale, AVX2, AVX, SSE2, NONE)
DECLARE_VECTORMATH_cC2C(Shift, AVX2, AVX, SSE2, NONE)
/* declare internal prototypes of SIMD-specific vector math functions with 1 REAL8 vector input to 1 REAL8 vector output (D2D) */
#define DECLARE_VECTORMATH_D2D(NAME, ...) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment