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

◆ test_add_sat_u8_16_full_saturate()

bool autoresearch::simd_check::test_add_sat_u8_16_full_saturate ( )
inline

Definition at line 142 of file AutoResearchSimd.h.

142 {
143 // 255 + 255 = 255 (saturated), 0 + 0 = 0
144 uint8_t a[16] = {255,255,0,0, 128,1,254,255, 255,255,0,0, 128,1,254,255};
145 uint8_t b[16] = {255,1,0,0, 128,255,2,0, 255,1,0,0, 128,255,2,0};
146 uint8_t expected[16] = {255,255,0,0, 255,255,255,255, 255,255,0,0, 255,255,255,255};
147 uint8_t output[16] = {0};
148 store_u8_16(output, add_sat_u8_16(load_u8_16(a), load_u8_16(b)));
149 return compare_u8(expected, output, 16);
150}
bool compare_u8(const uint8_t *a, const uint8_t *b, size_t n)
unsigned char uint8_t
Definition s16x16x4.h:209

References compare_u8().

Referenced by getTests().

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