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

◆ test_mulhi_u32_4()

bool autoresearch::simd_check::test_mulhi_u32_4 ( )
inline

Definition at line 509 of file AutoResearchSimd.h.

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

Referenced by getTests().

+ Here is the caller graph for this function: