Unverified Commit 432a4f4d authored by Marvin Gießing's avatar Marvin Gießing Committed by GitHub
Browse files

Initial support for ppc64le (#1316)


Signed-off-by: default avatarmgiessing <marvin.giessing@gmail.com>
parent a685654b
......@@ -26,8 +26,31 @@ typedef struct {float a; float b; float c; float d;} __m128;
typedef struct {int a; int b; int c; int d;} __m128i;
typedef struct {double a; double b;} __m128d;
#endif
#elif defined(__powerpc64__)
#ifdef __CUDACC__
#undef USE_VSX // Doesn't work with nvcc, undefined symbols
#else
#include <altivec.h>
#undef USE_VSX // Not yet implemented
#endif
#undef USE_AVX // x86_64 only
#undef USE_AVX2 // x86_64 only
#undef USE_SSE2 // x86_64 only
#undef USE_SSE41 // x86_64 only
#undef USE_SSE42 // x86_64 only
#undef USE_FMA // x86_64 only
#ifdef USE_VSX
typedef vector float __m128;
typedef vector signed int __m128i;
typedef vector double __m128d;
#else
typedef struct {float a; float b; float c; float d;} __m128;
typedef struct {int a; int b; int c; int d;} __m128i;
typedef struct {double a; double b;} __m128d;
#endif
#else
#undef USE_NEON // ARM64 only
#undef USE_VSX // PPC only
#ifdef __FMA__
#define USE_FMA
#endif
......
......@@ -41,7 +41,7 @@ template <> struct InstrFloatTraits<Scalar, double>
}
}
#if !defined(__aarch64__)
#if !defined(__aarch64__) && !defined(__powerpc64__)
#ifdef USE_SSE42
#ifndef _MSC_VER
#include <popcntintrin.h>
......
......@@ -10,7 +10,7 @@ using std::size_t;
namespace BinSearch {
enum InstrSet { Scalar, SSE, AVX, Neon };
enum InstrSet { Scalar, SSE, AVX, Neon, VSX };
#define ALGOENUM(x, b) x,
enum Algos
......
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