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

◆ test_mulhi_u32_4()

bool autoresearch::simd_check::test_mulhi_u32_4 ( )
inline

Definition at line 510 of file AutoResearchSimd.h.

510 {
511 // mulhi_u32_4: ((u64)a * (u64)b) >> 16 (unsigned)
512 uint32_t a[4] = {0x00010000, 0x00020000, 0x00030000, 0x00008000};
513 uint32_t b[4] = {0x00020000, 0x00030000, 0x00010000, 0x00008000};
514 uint32_t output[4] = {0};
515 store_u32_4(output, mulhi_u32_4(load_u32_4(a), load_u32_4(b)));
516 if (output[0] != 0x00020000) return false; // 1.0 * 2.0
517 if (output[1] != 0x00060000) return false; // 2.0 * 3.0
518 if (output[2] != 0x00030000) return false; // 3.0 * 1.0
519 if (output[3] != 0x00004000) return false; // 0.5 * 0.5
520 return true;
521}

Referenced by getTests().

+ Here is the caller graph for this function: