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

Function test_max_u8_16

examples/SIMD/simd_tests.cpp:143–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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};
145 uint8_t b_data[16] = {50, 100, 150, 20, 50, 100, 150, 20, 50, 100, 150, 20, 50, 100, 150, 20};
146 uint8_t expected[16] = {100, 100, 200, 20, 100, 100, 200, 20, 100, 100, 200, 20, 100, 100, 200, 20};
147 uint8_t output[16] = {0};
148
149 simd_u8x16 a = load_u8_16(a_data);
150 simd_u8x16 b = load_u8_16(b_data);
151 simd_u8x16 c = max_u8_16(a, b);
152 store_u8_16(output, c);
153
154 if (!compare_u8_arrays(expected, output, 16)) {
155 result.fail("Max operation produced incorrect results");
156 }
157}
158
159void test_avg_u8_16(TestResult& result) {
160 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