# Learn SVE and SME programming with SIMD Loops

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/cross-platform/simd-loops/)
- [About Single Instruction, Multiple Data loops](https://learn.arm.com/learning-paths/cross-platform/simd-loops/1-about/)
- [Using SIMD Loops](https://learn.arm.com/learning-paths/cross-platform/simd-loops/2-using/)
- [Code example](https://learn.arm.com/learning-paths/cross-platform/simd-loops/3-example/)
- [Learning with SIMD Loops](https://learn.arm.com/learning-paths/cross-platform/simd-loops/4-conclusion/)
- [Next Steps](https://learn.arm.com/learning-paths/cross-platform/simd-loops/_next-steps/)

## About this Learning Path

| Skill level: | Advanced |
|--------------|----------|
| Reading time: | 30 min |
| Last updated: | 03 Aug 2026 |

### Authors:
- Alejandro Martinez Vicente, Arm
- Mohamad Najem, Arm

### Arm IP:
- [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors)
- [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors)

### Tags:
- [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture)
- [Linux](https://learn.arm.com/tag/linux)
- [macOS](https://learn.arm.com/tag/macos)
- [C](https://learn.arm.com/tag/c)
- [CPP](https://learn.arm.com/tag/cpp)
- [GCC](https://learn.arm.com/tag/gcc)
- [Clang](https://learn.arm.com/tag/clang)
- [SME2](https://learn.arm.com/tag/sme2)

### Who is this for?
This is an advanced topic for software developers who want to learn how to use the full range of features available in SVE, SVE2, and SME2 to improve software performance on Arm processors.

### What will you learn?
Upon completion of this Learning Path, you will be able to:

- Improve SIMD code performance using Scalable Vector Extension (SVE) and Scalable Matrix Extension (SME)
- Describe what SIMD Loops contains and how kernels are organized across scalar, Neon, SVE, SVE2, and SME2 variants
- Build and run a selected kernel with the provided runner and validate correctness against the C reference
- Choose the appropriate build target to compare Neon, SVE/SVE2, and SME2 implementations

### Prerequisites
Before starting, you will need the following:

- An AArch64 computer running Linux or macOS. You can use cloud instances, refer to [Get started with Arm-based cloud instances](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/) for a list of cloud service providers
- Some familiarity with SIMD programming and Neon intrinsics
- Recent toolchains that support SVE and SME (GCC 13+ or Clang 16+ recommended)

### Summary
You’ll use the SIMD Loops project to explore Arm Neon, SVE and SVE2, and SME2 kernels. First, you’ll clone the repository, verify the Arm environment, and inspect `loops.inc`. You’ll study loop 202 and `matmul_fp32` across scalar, Neon, SVE, SVE2, and SME2 variants. Then, you’ll build selected kernels, compare them with the C reference, and examine predication, vector-length-agnostic programming, gather/scatter, streaming mode, and ZA tiles.

### Frequently asked questions
<details>
<summary>How do I know I’m running on an Arm machine before using SIMD Loops?</summary>
Run `uname -m`. Expect `aarch64` on Linux or `arm64` on macOS. If you see another value, switch to an Arm-based system before continuing.
</details>

<details>
<summary>Where do I find the list of available loop kernels and their descriptions?</summary>
Browse the `loops` directory and open `loops.inc`. It lists the kernels with brief descriptions and the identifiers used by the project.
</details>

<details>
<summary>Which files should I open to study the matrix multiplication example?</summary>
Open `loops/loop_202.c` and locate `inner_loop_202()` around lines 60–70. Then open `loops/matmul_fp32.c`, which implements `C[M × N] = A[M × K] × B[K × N]`.
</details>

<details>
<summary>What SIMD features can I explore with the kernels in SIMD Loops?</summary>
You can explore predication, vector-length-agnostic (VLA) programming, gather/scatter, streaming mode, and ZA tiles. Implementations use C and Arm C Language Extensions (ACLE) intrinsics.
</details>

<details>
<summary>How do I validate a kernel and compare Neon, SVE and SVE2, and SME2 implementations?</summary>
Build and run the selected kernel with the project runner, then validate its results against the C reference implementation. Choose the build target for each variant to compare scalar, Neon, SVE and SVE2, and SME2 behavior.
</details>
