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

Function test_min_u8_16

examples/SIMD/simd_tests.cpp:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125// ============================================================================
126
127void test_min_u8_16(TestResult& result) {
128 uint8_t a_data[16] = {100, 50, 200, 10, 100, 50, 200, 10, 100, 50, 200, 10, 100, 50, 200, 10};
129 uint8_t b_data[16] = {50, 100, 150, 20, 50, 100, 150, 20, 50, 100, 150, 20, 50, 100, 150, 20};
130 uint8_t expected[16] = {50, 50, 150, 10, 50, 50, 150, 10, 50, 50, 150, 10, 50, 50, 150, 10};
131 uint8_t output[16] = {0};
132
133 simd_u8x16 a = load_u8_16(a_data);
134 simd_u8x16 b = load_u8_16(b_data);
135 simd_u8x16 c = min_u8_16(a, b);
136 store_u8_16(output, c);
137
138 if (!compare_u8_arrays(expected, output, 16)) {
139 result.fail("Min operation produced incorrect results");
140 }
141}
142
143void test_max_u8_16(TestResult& result) {
144 uint8_t a_data[16] = {100, 50, 200, 10, 100, 50, 200, 10, 100, 50, 200, 10, 100, 50, 200, 10};

Callers

nothing calls this directly

Calls 2

compare_u8_arraysFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected