cuda-fixnum icon indicating copy to clipboard operation
cuda-fixnum copied to clipboard

Allow checking for overflow without penalising fast path

Open unzvfu opened this issue 5 years ago • 1 comments

Currently, to assert that addition doesn't overflow, we

add_cy(s, cy, a, b);
assert(digit::is_zero(cy));

If NDEBUG is not set, then this checks that overflow hasn't occurred. If NDEBUG is set, it's possible (need to verify) that some carry handling code is generated; this is wasteful as it isn't used.

unzvfu avatar Aug 27 '18 04:08 unzvfu

Follow up at https://github.com/unzvfu/cuda-fixnum/issues/31.

unzvfu avatar Mar 21 '20 02:03 unzvfu