Closed ndgrigorian closed 2 weeks ago
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. :crossed_fingers:
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_209 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_212 ran successfully. Passed: 894 Failed: 1 Skipped: 119
This PR proposes a solution to undefined behavior that could occur in some edge cases with integer advanced indexing, where indices OOB for
ssize_t
(akastd::ptrdiff_t
) would be cast directly tossize_t
and overflow or underflow.As
ssize_t
/std::ptrdiff_t
is defined to be a signed type with the same size assize_t
, this means that on 32-bit systems, overflow/underflow could occur for even smaller values.This PR also re-organizes
integer_advanced_indexing.hpp
by reducing namespace clutter, and moves the rewrittenClipIndex
andWrapIndex
structs into a separate header file. This enables them to be re-used more easily in extensions.