[c0,c1,c2] += a * b */
| 61 | |
| 62 | /** [c0,c1,c2] += a * b */ |
| 63 | inline void muladd3(limb_t& c0, limb_t& c1, limb_t& c2, const limb_t& a, const limb_t& b) |
| 64 | { |
| 65 | double_limb_t t = (double_limb_t)a * b; |
| 66 | limb_t th = t >> LIMB_SIZE; |
| 67 | limb_t tl = t; |
| 68 | |
| 69 | c0 += tl; |
| 70 | th += (c0 < tl) ? 1 : 0; |
| 71 | c1 += th; |
| 72 | c2 += (c1 < th) ? 1 : 0; |
| 73 | } |
| 74 | |
| 75 | /** [c0,c1,c2] += 2 * a * b */ |
| 76 | inline void muldbladd3(limb_t& c0, limb_t& c1, limb_t& c2, const limb_t& a, const limb_t& b) |