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

Function test_min_i32_4

examples/AutoResearch/AutoResearchSimd.h:467–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465// ============================================================================
466
467inline bool test_min_i32_4() {
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}
478
479inline bool test_max_i32_4() {
480 uint32_t a[4] = {as_u32(10), as_u32(-10), as_u32(0x7FFFFFFF), as_u32(-1)};

Callers

nothing calls this directly

Calls 2

as_u32Function · 0.85
as_i32Function · 0.85

Tested by

no test coverage detected