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

◆ test_min_i32_4()

bool autoresearch::simd_check::test_min_i32_4 ( )
inline

Definition at line 467 of file AutoResearchSimd.h.

467 {
468 uint32_t a[4] = {as_u32(10), as_u32(-10), as_u32(0x7FFFFFFF), as_u32(-1)};
469 uint32_t b[4] = {as_u32(20), as_u32(10), as_u32((int32_t)0x80000000), as_u32(0)};
470 uint32_t output[4] = {0};
471 store_u32_4(output, min_i32_4(load_u32_4(a), load_u32_4(b)));
472 if (as_i32(output[0]) != 10) return false;
473 if (as_i32(output[1]) != -10) return false;
474 if (as_i32(output[2]) != (int32_t)0x80000000) return false; // INT32_MIN < INT32_MAX
475 if (as_i32(output[3]) != -1) return false; // -1 < 0
476 return true;
477}
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: