guardedDivInto
fn
size_t guardedDivInto(T, R, string op)(const(T)[] a,
const(T)[] b, R[] outValues, ulong[] outGuards) if (isIntegral!T && (op == "/" || op == "%"))Computes the guarded integer division or modulo into outValues, writing a zero at guarded-out slots (the caller nulls those slots from the guard words). Every slot is inspected before dividing, so null slots whose bits happen to be zero or T.min % -1 never trap (D14). Integer `/` is true division: the result element type R is double.
Parameters
T | the common element type (integral) |
R | the result element type (double for `"/"`, T for `"%"`) |
op | `"/"` or `"%"` |
a | the left operand |
b | the right operand (same length as a) |
outValues | the destination, a.length elements |
outGuards | the guard bits, at least packedWords(a.length) words; a set bit means the slot is computed |
Returns
the number of guard words written.