libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
Loading...
Searching...
No Matches
simd.h File Reference

SIMD capability detection and platform abstraction macros. More...

#include <stdint.h>
#include "snobol/c23_compat.h"
Include dependency graph for simd.h:

Go to the source code of this file.

Macros

#define SNOBOL_HAS_AVX2   0
#define SNOBOL_HAS_NEON   0
#define SNOBOL_HAS_SIMD   (SNOBOL_HAS_AVX2 || SNOBOL_HAS_NEON)

Typedefs

typedef uint64_t simd_reg_t[4]

Enumerations

enum  { SNOBOL_SIMD_WIDTH = 1 }
enum  { SNOBOL_SIMD_NFA_MAX_STATES = 256 }

Detailed Description

SIMD capability detection and platform abstraction macros.

Provides compile-time detection of SIMD instruction set extensions (AVX2 on x86-64, NEON on ARM64) and defines portable macros for SIMD width and feature availability.

The scalar fallback (SNOBOL_SIMD_WIDTH=1) is used when no SIMD support is detected at compile time.

Definition in file simd.h.

Macro Definition Documentation

◆ SNOBOL_HAS_AVX2

#define SNOBOL_HAS_AVX2   0

Defined to 1 when AVX2 is available (x86-64 with -mavx2).

Definition at line 33 of file simd.h.

◆ SNOBOL_HAS_NEON

#define SNOBOL_HAS_NEON   0

Defined to 1 when ARM NEON is available (ARM64/AArch64).

Definition at line 41 of file simd.h.

◆ SNOBOL_HAS_SIMD

#define SNOBOL_HAS_SIMD   (SNOBOL_HAS_AVX2 || SNOBOL_HAS_NEON)

Defined to 1 when any SIMD extension is available.

Definition at line 46 of file simd.h.

Typedef Documentation

◆ simd_reg_t

typedef uint64_t simd_reg_t[4]

Definition at line 87 of file simd.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SNOBOL_SIMD_WIDTH 

Definition at line 63 of file simd.h.

◆ anonymous enum

anonymous enum
Enumerator
SNOBOL_SIMD_NFA_MAX_STATES 

Definition at line 88 of file simd.h.