Skip to content

Commit fda66c8

Browse files
committed
use the simde header library for greater compatibility
1 parent 20f24e3 commit fda66c8

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "simde"]
2+
path = simde
3+
url = https://github.com/nemequ/simde-no-tests

aligner_sw.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@
6666

6767
#define INLINE_CUPS
6868

69+
#define SIMDE_ENABLE_NATIVE_ALIASES
70+
#include <simde/x86/sse2.h>
6971
#include <stdint.h>
7072
#include <iostream>
7173
#include <limits>
7274
#include "threading.h"
73-
#include <emmintrin.h>
7475
#include "aligner_sw_common.h"
7576
#include "aligner_sw_nuc.h"
7677
#include "ds.h"

processor_support.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#if defined(__INTEL_COMPILER)
1414
# define USING_INTEL_COMPILER
15-
#elif defined(__GNUC__)
15+
#elif defined(__GNUC__) && defined(__x86_64__) || defined(__i386__)
1616
# define USING_GCC_COMPILER
1717
# include <cpuid.h>
1818
#elif defined(_MSC_VER)
@@ -52,8 +52,7 @@ class ProcessorSupport {
5252
#elif defined(USING_GCC_COMPILER)
5353
__get_cpuid(0x1, &regs.EAX, &regs.EBX, &regs.ECX, &regs.EDX);
5454
#else
55-
std::cerr << "ERROR: please define __cpuid() for this build.\n";
56-
assert(0);
55+
return false;
5756
#endif
5857
if( !( (regs.ECX & BIT(20)) && (regs.ECX & BIT(23)) ) ) return false;
5958
}

simde

Submodule simde added at 54c104c

sse_util.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
#ifndef SSE_UTIL_H_
2121
#define SSE_UTIL_H_
2222

23+
#define SIMDE_ENABLE_NATIVE_ALIASES
24+
#include <simde/x86/sse2.h>
25+
2326
#include "assert_helpers.h"
2427
#include "ds.h"
2528
#include "limit.h"
2629
#include <iostream>
27-
#include <emmintrin.h>
2830

2931
class EList_m128i {
3032
public:

0 commit comments

Comments
 (0)