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

◆ test_scale_u8_16()

bool autoresearch::simd_check::test_scale_u8_16 ( )
inline

Definition at line 176 of file AutoResearchSimd.h.

176 {
177 uint8_t a[16] = {255,128,64,32, 255,128,64,32, 255,128,64,32, 255,128,64,32};
178 uint8_t output[16] = {0};
179 store_u8_16(output, scale_u8_16(load_u8_16(a), 128));
180 for (int i = 0; i < 16; i++) {
181 int expected = (a[i] * 128) / 256;
182 int diff = (int)output[i] - expected;
183 if (diff < -1 || diff > 1) return false;
184 }
185 return true;
186}

Referenced by getTests().

+ Here is the caller graph for this function: