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

◆ test_max_i32_4()

bool autoresearch::simd_check::test_max_i32_4 ( )
inline

Definition at line 479 of file AutoResearchSimd.h.

479 {
480 uint32_t a[4] = {as_u32(10), as_u32(-10), as_u32(0x7FFFFFFF), as_u32(-1)};
481 uint32_t b[4] = {as_u32(20), as_u32(10), as_u32((int32_t)0x80000000), as_u32(0)};
482 uint32_t output[4] = {0};
483 store_u32_4(output, max_i32_4(load_u32_4(a), load_u32_4(b)));
484 if (as_i32(output[0]) != 20) return false;
485 if (as_i32(output[1]) != 10) return false;
486 if (as_i32(output[2]) != 0x7FFFFFFF) return false;
487 if (as_i32(output[3]) != 0) return false;
488 return true;
489}
uint32_t as_u32(int32_t v)
int32_t as_i32(uint32_t v)

References as_i32(), and as_u32().

Referenced by getTests().

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