FastLED 3.9.15
Loading...
Searching...
No Matches

◆ test_andnot_u8_16()

void simd_test::test_andnot_u8_16 ( TestResult & result)

Definition at line 243 of file simd_tests.cpp.

243 {
244 uint8_t a_data[16] = {0xF0, 0x0F, 0xAA, 0x55, 0xF0, 0x0F, 0xAA, 0x55, 0xF0, 0x0F, 0xAA, 0x55, 0xF0, 0x0F, 0xAA, 0x55};
245 uint8_t b_data[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
246 uint8_t expected[16] = {0x0F, 0xF0, 0x55, 0xAA, 0x0F, 0xF0, 0x55, 0xAA, 0x0F, 0xF0, 0x55, 0xAA, 0x0F, 0xF0, 0x55, 0xAA};
247 uint8_t output[16] = {0};
248
249 simd_u8x16 a = load_u8_16(a_data);
250 simd_u8x16 b = load_u8_16(b_data);
251 simd_u8x16 c = andnot_u8_16(a, b);
252 store_u8_16(output, c);
253
254 if (!compare_u8_arrays(expected, output, 16)) {
255 result.fail("AND-NOT operation produced incorrect results");
256 }
257}
platforms::simd_u8x16 simd_u8x16
Definition types.h:24
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31
unsigned char uint8_t
Definition s16x16x4.h:209
bool compare_u8_arrays(const uint8_t *a, const uint8_t *b, size_t count)
Compare two uint8_t arrays element-wise.

References compare_u8_arrays().

Referenced by setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: