Implement abstractions over Structs and NDArray #554

Merged
sb10q merged 16 commits from ndstrides-neo into master 2024-11-21 18:16:28 +08:00
Collaborator

Contains changes from ndstrides-1-model and ndstrides-2-basic, up to before NDArray model is changed. Loosely based on FieldTraversal, but with the help of #[derive(StructFields)] macro. Models and Instances are all refactored into ProxyType and ProxyValue respectively.

Other Changes:

  • NDArray is now implemented using void* to prepare for ndstrides implementation.

No functionality changes.

Contains changes from `ndstrides-1-model` and `ndstrides-2-basic`, up to before `NDArray` model is changed. Loosely based on `FieldTraversal`, but with the help of `#[derive(StructFields)]` macro. Models and Instances are all refactored into ProxyType and ProxyValue respectively. Other Changes: - NDArray is now implemented using `void*` to prepare for ndstrides implementation. No functionality changes.
derppening added 16 commits 2024-11-20 15:52:59 +08:00
2822074b2d [meta] Cleanup from upgrading Rust version
- Remove rust_2024_edition warnings, since it wouldn't be released for
another 3 months
- Fix new clippy warnings
26a1b85206 [core] codegen/classes: Remove Underlying type
This is confusing and we want a better abstraction than this.
a4f53b6e6b [core] codegen: Refactor ProxyType and ProxyValue
Accepts generator+context object for generic type checking. Also
implements more default trait impl for easier delegation.
d7633c42bc [core] codegen/types: Implement StructField{,s}
Loosely based on FieldTraversal by lyken.
1a535db558 [core] codegen: Add dtype to NDArrayType
We won't have this once NDArray is refactored to strided impl.
a0b08dbb85 [core] irrt: Update some IRRT implementation
- Change CSlice to use `void*` for better pointer compatibility
- Remove __STDC_VERSION__ guard
- Only include impl *.hpp files in irrt.cpp
- Refactor typedef to using declaration
- Add missing ``// namespace`
24284f83a8 [core] irrt: Break IRRT into several impl files
Each IRRT file is now mapped to one Rust file.
5576087164 [core] codegen/types: Implement NDArray in terms of i8*
Better aligns with the future implementation of ndstrides.
0c0c2ebc8b [core] coregen/types: Implement StructFields for NDArray
Also rename some fields to better align with their naming in numpy.
derppening requested review from sb10q 2024-11-20 15:53:04 +08:00
derppening force-pushed ndstrides-neo from 0c0c2ebc8b to bd43e5eb35 2024-11-20 15:58:28 +08:00 Compare
derppening force-pushed ndstrides-neo from bd43e5eb35 to 144f0922db 2024-11-21 15:31:39 +08:00 Compare
Author
Collaborator

Rebased with __STDC_VERSION__ restored and #pragma clang diagnostic added for use of _BitInt.

Rebased with `__STDC_VERSION__` restored and `#pragma clang diagnostic` added for use of `_BitInt`.
sb10q merged commit 144f0922db into master 2024-11-21 18:16:28 +08:00
sb10q deleted branch ndstrides-neo 2024-11-21 18:16:29 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#554
No description provided.