MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_max_i32_4

Function test_max_i32_4

examples/AutoResearch/AutoResearchSimd.h:479–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479inline bool test_max_i32_4() {
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}
490
491// ============================================================================
492// Fixed-Point Multiply Tests (Q16.16)

Callers

nothing calls this directly

Calls 2

as_u32Function · 0.85
as_i32Function · 0.85

Tested by

no test coverage detected