-
|
Can you please explain the SIMD layer in the C project? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Yes, like you said, this is an abstraction layer for using x86 SSE intrinsics. I am only using the 4 floats at a time operations. It creates 4 reusable types and functions (operations) to use with those types. They are:
There are then a bunch of operations defined to use with these structs. There are also wrapper functions around intrinsics, masking and selection functions. There are also utility macros for shuffling. |
Beta Was this translation helpful? Give feedback.
Yes, like you said, this is an abstraction layer for using x86 SSE intrinsics. I am only using the 4 floats at a time operations.
This is used for various math and vector operations.
This makes using these operations easier to use than writing out raw
_mm_mul_ps(a, b)calls everywhere throughout the code.It creates 4 reusable types and functions (operations) to use with those types. They are:
f32_4x4 element vector with 32-bit floating point values or 32-bit integers, either are supported.v3_4x- this is traditional vector with 3 scalars, it stores 4 of them batched together for SIMD registers and operations.v4_4x- Just like the v3_4x but for vectors with 4 scalar properties.There…