infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
Ch02_SIMD_SVE.c File Reference

Cookbook Chapter 2: Working with SIMD Vectors (AArch64 SVE) More...

#include <infix/infix.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for Ch02_SIMD_SVE.c:

Functions

int main ()
 

Detailed Description

Cookbook Chapter 2: Working with SIMD Vectors (AArch64 SVE)

This example demonstrates interfacing with ARM's Scalable Vector Extension (SVE). SVE is unique because the vector register size is not fixed by the architecture; it is implemented by the CPU and can vary (128 bits, 256 bits, 512 bits, etc.).

This requires a dynamic approach:

  1. Check for SVE support at runtime.
  2. Query the CPU's implemented vector length.
  3. Build the infix signature string dynamically based on the result.
  4. Create and call the trampoline using the dynamically generated signature.

NOTE: This program must be compiled for AArch64 with SVE enabled (e.g., -march=armv8-a+sve) and run on supporting hardware.

Function Documentation

◆ main()

int main ( void  )