| 105 | } |
| 106 | |
| 107 | void test_blend_u8_16(TestResult& result) { |
| 108 | uint8_t a_data[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| 109 | uint8_t b_data[16] = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; |
| 110 | uint8_t expected[16] = {127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127}; |
| 111 | uint8_t output[16] = {0}; |
| 112 | |
| 113 | simd_u8x16 a = load_u8_16(a_data); |
| 114 | simd_u8x16 b = load_u8_16(b_data); |
| 115 | simd_u8x16 c = blend_u8_16(a, b, 128); // 50% blend |
| 116 | store_u8_16(output, c); |
| 117 | |
| 118 | if (!compare_u8_arrays(expected, output, 16)) { |
| 119 | result.fail("Blend operation produced incorrect results"); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // ============================================================================ |
| 124 | // Comparison Tests |
nothing calls this directly
no test coverage detected