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

◆ test_blend_u8_16_endpoints()

bool autoresearch::simd_check::test_blend_u8_16_endpoints ( )
inline

Definition at line 220 of file AutoResearchSimd.h.

220 {
221 // amount=0 -> all a, amount=255 -> ~all b
222 uint8_t a[16] = {100,100,100,100, 100,100,100,100, 100,100,100,100, 100,100,100,100};
223 uint8_t b[16] = {200,200,200,200, 200,200,200,200, 200,200,200,200, 200,200,200,200};
224 uint8_t output0[16] = {0};
225 uint8_t output255[16] = {0};
226 store_u8_16(output0, blend_u8_16(load_u8_16(a), load_u8_16(b), 0));
227 store_u8_16(output255, blend_u8_16(load_u8_16(a), load_u8_16(b), 255));
228 for (int i = 0; i < 16; i++) {
229 if (output0[i] != 100) return false; // amount=0 -> a
230 int diff = (int)output255[i] - 200;
231 if (diff < -2 || diff > 2) return false; // amount=255 -> ~b
232 }
233 return true;
234}
unsigned char uint8_t
Definition s16x16x4.h:209

Referenced by getTests().

+ Here is the caller graph for this function: