You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// normal arithmetic, but in unsigned SWAR it is preferable to double the
103
107
/// precision before executing addition, thus guaranteeing no overflow will
104
108
/// occur and using the more performant operator+ addition. Hence,
105
-
/// the carry and overflow flags are mostly useful in SWAR for detection of unsigned overflow (as for unsigned addition they are semantically identical.
109
+
/// the carry flag is mostly useful in SWAR for detection of unsigned overflow,
110
+
/// as opposed to a helper to achieve higher precision as it is normally used:
111
+
/// Once we support non-power-of-two sizes of lanes in number of bits, we could
112
+
/// have transformations that would convert a SWAR of lanes of N bits to a SWAR
113
+
/// of (N + 1) bits, however, functionally, the performance cost of doing this
114
+
/// will be strictly higher than doubling the bit count of the current SWAR.
115
+
/// With double the number of bits, not only are additions guaranteed to not
116
+
/// overflow (as unsigned) but even multiplications won't. Then it is not
117
+
/// practical to use the carry bit for other than detection of unsigned overflow.
106
118
///
107
119
/// The signed integer interpretation is two's complement, which
108
120
/// routinely overflows (when interpreted as unsigned). Signed overflow may only
0 commit comments