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

◆ test_crossval_scale_u8_16()

bool autoresearch::simd_check::test_crossval_scale_u8_16 ( )
inline

Definition at line 788 of file AutoResearchSimd.h.

788 {
789 // Adversarial: mix of 0, 1, 127, 128, 254, 255 with various scale factors
790 uint8_t v[16] = {0,1,127,128, 254,255,0x55,0xAA, 0x0F,0xF0,0x80,0x7F, 0x01,0xFE,0xFF,0x00};
791 uint8_t scale_vals[] = {0, 1, 127, 128, 254, 255};
792 for (int s = 0; s < 6; s++) {
793 uint8_t expected[16], actual[16];
794 ref_scale_u8_16(v, scale_vals[s], expected);
795 store_u8_16(actual, scale_u8_16(load_u8_16(v), scale_vals[s]));
796 if (!compare_u8(expected, actual, 16)) return false;
797 }
798 return true;
799}
void ref_scale_u8_16(const uint8_t *v, uint8_t scale, uint8_t *out)
bool compare_u8(const uint8_t *a, const uint8_t *b, size_t n)

References compare_u8(), and ref_scale_u8_16().

Referenced by getTests().

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