ndstrides: [3] Implement indexing/slicing #513

Open
lyken wants to merge 3 commits from ndstrides-3-indexing into ndstrides-2-basic

3 Commits

Author SHA1 Message Date
lyken 8f9d2d82dd core/ndstrides: implement ndarray indexing
The functionality for `...` and `np.newaxis` is there in IRRT, but there
is no implementation of them for @kernel Python expressions because of
#486.
2024-10-18 14:21:42 +08:00
lyken 9d0bfd965c core/irrt: rename NDIndex to NDIndexInt
Unfortunately the name `NDIndex` is used in later commits. Renaming this
typedef to `NDIndexInt` to avoid amending. `NDIndexInt` will be removed
anyway when ndarray strides is completed.
2024-10-18 14:21:42 +08:00
lyken 01c9639646 core/irrt: add Slice and Range
Needed for implementing general ndarray indexing.

Currently IRRT slice and range have nothing to do with NAC3's slice
and range. The IRRT slice and range are currently there to implement
ndarray specific features. However, in the future their definitions may
be used to replace that of NAC3's. (NAC3's range is a [i32 x 3], IRRT's
range is a proper struct. NAC3 does not have a slice struct).
2024-10-18 14:21:42 +08:00