FastLED 3.10.9
Loading...
Searching...
No Matches

◆ test_blend_u8_16_endpoints()

bool autoresearch::simd_check::test_blend_u8_16_endpoints ( )
inline

Definition at line 221 of file AutoResearchSimd.h.

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

Referenced by getTests().

+ Here is the caller graph for this function: