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

◆ test_crossval_add_sat_u8_16()

bool autoresearch::simd_check::test_crossval_add_sat_u8_16 ( )
inline

Definition at line 815 of file AutoResearchSimd.h.

815 {
816 // Test adversarial: all-255+all-255, alternating, near-overflow
817 uint8_t a[16] = {255,254,128,127, 0,1,200,50, 0xFF,0x80,0x7F,0x01, 100,200,150,250};
818 uint8_t b[16] = {255,2,128,129, 0,255,56,206, 0x01,0x80,0x81,0xFF, 156,56,106,6};
819 uint8_t expected[16], actual[16];
820 ref_add_sat_u8_16(a, b, expected);
821 store_u8_16(actual, add_sat_u8_16(load_u8_16(a), load_u8_16(b)));
822 return compare_u8(expected, actual, 16);
823}
void ref_add_sat_u8_16(const uint8_t *a, const uint8_t *b, uint8_t *out)
bool compare_u8(const uint8_t *a, const uint8_t *b, size_t n)

References compare_u8(), and ref_add_sat_u8_16().

Referenced by getTests().

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