FastLED 3.9.15
Loading...
Searching...
No Matches

◆ test_i32_pipeline_shift_add_mask()

bool autoresearch::simd_check::test_i32_pipeline_shift_add_mask ( )
inline

Definition at line 1079 of file AutoResearchSimd.h.

1079 {
1080 // Simulate fixed-point angle decomposition: shift, add, mask
1081 uint32_t angles[4] = {0x10000000, 0x20000000, 0x30000000, 0x40000000};
1082 simd_u32x4 v = load_u32_4(angles);
1083 v = srl_u32_4(v, 16); // Extract high 16 bits
1084 v = add_i32_4(v, set1_u32_4(0x100)); // Add offset
1085 v = and_u32_4(v, set1_u32_4(0xFFFF)); // Mask to 16 bits
1086 uint32_t output[4] = {0};
1087 store_u32_4(output, v);
1088 uint32_t expected[4] = {0x1100, 0x2100, 0x3100, 0x4100};
1089 return compare_u32(expected, output, 4);
1090}
bool compare_u32(const uint32_t *a, const uint32_t *b, size_t n)
platforms::simd_u32x4 simd_u32x4
Definition types.h:26

References compare_u32().

Referenced by getTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: