Commit Graph

12 Commits

Author SHA1 Message Date
0206c3989a 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-17 13:56:35 +08:00
7327f979fb 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-17 13:52:27 +08:00
f07fe3b88e 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-17 13:52:27 +08:00
9d8358c0e7 core/ndstrides: implement ndarray iterator NDIter
A necessary utility to iterate through all elements in a possibly strided ndarray.
2024-10-17 13:44:43 +08:00
9d87975c01 core/ndstrides: introduce NDArray
NDArray with strides.
2024-10-17 13:44:43 +08:00
35d30703eb core/irrt: fix exception.hpp C++ castings 2024-10-17 13:44:43 +08:00
bd06155f34 irrt: compatibility with pre-C23 compilers 2024-09-05 18:54:55 +08:00
15ac00708a [core] Use quoted include paths instead of angled brackets
This is preferred for user-defined headers.
2024-08-28 16:37:03 +08:00
9848795dcc core/irrt: add exceptions and debug utils 2024-08-27 22:55:22 +08:00
58222feed4 core/irrt: split into headers 2024-08-27 22:55:22 +08:00
c6dade1394 core/irrt: reformat 2024-08-27 22:55:22 +08:00
d3b4c60d7f core/irrt: comment build.rs & move irrt to nac3core/irrt 2024-08-27 22:55:22 +08:00