|
solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
|
Portable Single Instruction Multiple Data (SIMD) Intrinsics Wrapper. More...
Go to the source code of this file.
Macros | |
| #define | simd_swizzle(v, x, y, z, w) ((simd_vec_t){{(v).f[(x)], (v).f[(y)], (v).f[(z)], (v).f[(w)]}}) |
| Rearranges vector components. | |
| #define | simd_transpose4(r0, r1, r2, r3) |
| Transposes a 4x4 matrix defined by 4 row/col vectors in-place. | |
Portable Single Instruction Multiple Data (SIMD) Intrinsics Wrapper.
This header provides a unified abstraction layer over hardware-accelerated vector operations. It automatically detects the target architecture and maps abstract vector types to the underlying hardware registers.
Supported Backends:
Design Philosophy:
xxxx... yyyy... zzzz... rather than xyz xyz....Usage Example:
Definition in file simd.h.
| #define simd_swizzle | ( | v, | |
| x, | |||
| y, | |||
| z, | |||
| w | |||
| ) | ((simd_vec_t){{(v).f[(x)], (v).f[(y)], (v).f[(z)], (v).f[(w)]}}) |
Rearranges vector components.
Usage: simd_vec_t result = simd_swizzle(v, SIMD_Y, SIMD_X, SIMD_W, SIMD_Z);