Skip to content

Commit

Permalink
ssecp, ssef: simde support for other archs
Browse files Browse the repository at this point in the history
ssef compiles, ssecp WIP
  • Loading branch information
rurban committed Nov 26, 2024
1 parent 538300f commit ad70807
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
21 changes: 20 additions & 1 deletion source/algos/ssecp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,27 @@
#include "include/main.h"
#include "include/search_small.h"

#include <assert.h>
#ifdef __SSE4__
#include <nmmintrin.h>
#else
#define SIMDE_ENABLE_NATIVE_ALIASES
#include "simde/x86/sse4.2.h"
//#define __m128i simde__m128i
//#define _mm_loadu_si128 simde_mm_loadu_si128
//#define _mm_extract_epi32 simde_mm_extract_epi32
//#define _mm_set_epi8 simde_mm_set_epi8
//#define _mm_and_si128 simde_mm_and_si128
//#define _mm_cmpestrm simde_mm_cmpestrz
//#define _mm_cmpestri simde_mm_cmpestrs
//#define _mm_cmpestrc simde_mm_cmpestrz
//#define _mm_popcnt_u32 __builtin_popcount
//#define _SIDD_UBYTE_OPS SIMDE_SIDD_UBYTE_OPS
//#define _SIDD_CMP_EQUAL_ORDERED SIMDE_SIDD_CMP_EQUAL_ORDERED
//#define _SIDD_CMP_EQUAL_EACH SIMDE_SIDD_CMP_EQUAL_EACH
//#define _SIDD_NEGATIVE_POLARITY SIMDE_SIDD_NEGATIVE_POLARITY
#endif

#include <assert.h>
#include <stdint.h>

// BEWARE: code sometimes has access to load bytes after end of string.
Expand Down
7 changes: 7 additions & 0 deletions source/algos/ssef.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
#include "include/main.h"
#include "include/search_small.h"

#ifdef __SSE2__
#include <emmintrin.h>
#else
#define SIMDE_ENABLE_NATIVE_ALIASES
#include "simde/x86/sse2.h"
//#define __m128i simde__m128i
//#define _mm_movemask_epi8 simde_mm_movemask_epi8
#endif

typedef union {
__m128i *data16;
Expand Down

0 comments on commit ad70807

Please sign in to comment.