lyken
59bea2cd4d
core/ndstrides: implement len(ndarray) & refactor len()
2024-10-04 15:47:55 +08:00
lyken
c1913f11c6
core/ndstrides: implement np_{zeros,ones,full,empty}
2024-10-04 15:46:56 +08:00
lyken
7f4b4597c5
core/model: add util::gen_for_model
2024-10-04 15:45:47 +08:00
lyken
1a61a000b2
core/object: add ListObject and TupleObject
...
Needed for implementing other ndarray utils.
2024-10-04 15:44:42 +08:00
lyken
ec61b50486
core/ndstrides: implement ndarray iterator NDIter
...
A necessary utility to iterate through all elements in a possibly strided ndarray.
2024-10-04 15:42:52 +08:00
lyken
b523a3e227
core/ndstrides: introduce NDArray
...
NDArray with strides.
2024-10-04 15:39:17 +08:00
lyken
e4b050a64b
core/irrt: fix exception.hpp C++ castings
2024-10-04 15:26:08 +08:00
lyken
897c26bcfa
core/toplevel/helper: add {extract,create}_ndims
2024-10-04 15:26:08 +08:00
lyken
1ce76bcfc9
core/object: introduce object
...
A small abstraction to simplify implementations.
2024-10-04 15:26:08 +08:00
lyken
0bc98c447d
[core] introduce models
2024-10-04 15:21:43 +08:00
David Mak
581b2f7bb2
[standalone] Add demo for global variables
2024-10-04 13:24:30 +08:00
David Mak
746329ec5d
[standalone] Implement symbol resolution for globals
2024-10-04 13:24:30 +08:00
David Mak
e60e8e837f
[core] Add support for global statements
2024-10-04 13:24:27 +08:00
David Mak
9fdbe9695d
[core] Add generator to SymbolResolver::get_symbol_value
...
Needed in a future commit.
2024-10-04 13:20:29 +08:00
David Mak
8065e73598
[core] toplevel/composer: Add type analysis for global variables
2024-10-04 13:20:29 +08:00
David Mak
192290889b
[core] Add IdentifierInfo
...
Keeps track of whether an identifier refers to a global or local
variable.
2024-10-04 13:20:24 +08:00
David Mak
1407553a2f
[core] Implement parsing of global variables
...
Globals are now parsed into symbol resolver and top level definitions.
2024-10-04 13:18:29 +08:00
David Mak
c7697606e1
[core] Add TopLevelDef::Variable
2024-10-04 13:09:25 +08:00
David Mak
88d0ccbf69
[standalone] Explicit panic when encountering a compilation error
...
Otherwise scripts will continue to execute.
2024-10-04 13:00:16 +08:00
David Mak
a43b59539c
[meta] Move variables declarations closer to where they are first used
2024-10-04 13:00:16 +08:00
David Mak
fe06b2806f
[meta] Reorganize order of use declarations
...
Use declarations are now grouped into 4 groups:
- Declarations from the standard library
- Declarations from external crates
- Declarations from other crates in this project
- Declarations from within this module
Furthermore, all use declarations are grouped together to enhance
readability. super::super is also replaced by an equivalent crate::
declaration.
2024-10-04 12:52:01 +08:00
David Mak
7f6c9a25ac
[meta] Update Cargo dependencies
2024-10-04 12:52:01 +08:00
Sébastien Bourdeauducq
6c8382219f
msys2: get python via numpy dependencies
2024-09-30 14:27:30 +08:00
Sebastien Bourdeauducq
9274a7b96b
flake: update nixpkgs
2024-09-30 14:22:40 +08:00
Sébastien Bourdeauducq
d1c0fe2900
cargo: update dependencies
2024-09-30 14:14:43 +08:00
mwojcik
f2c047ba57
artiq: support async rpcs
...
Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
2024-09-13 12:12:13 +08:00
David Mak
5e2e77a500
[meta] Bump inkwell to v0.5
2024-09-13 11:11:14 +08:00
David Mak
f3cc4702b9
[meta] Update dependencies
2024-09-13 11:11:14 +08:00
David Mak
3e92c491f5
[standalone] Add tests creating ndarrays with tuple dims
2024-09-11 15:52:43 +08:00
lyken
7f629f1579
core: fix comment in unify_call
2024-09-11 15:46:19 +08:00
lyken
5640a793e2
core: allow np_full to take tuple shapes
2024-09-11 15:46:19 +08:00
David Mak
abbaa506ad
[standalone] Remove redundant recreation of TargetMachine
2024-09-09 14:27:10 +08:00
David Mak
f3dc02d646
[meta] Apply cargo fmt
2024-09-09 14:24:52 +08:00
David Mak
ea217eaea1
[meta] Update pre-commit config
...
Directly invoke cargo using nix develop to avoid using the system cargo.
2024-09-09 14:24:38 +08:00
Sébastien Bourdeauducq
5a34551905
allow the use of the LLVM shared library
...
Which in turns allows working around the incompatibility of the LLVM static library
with Rust link-args=-rdynamic, which produces binaries that either fail to link (OpenBSD)
or segfault on startup (Linux).
The year is 2024 and compiler toolchains are still a trash fire like this.
2024-09-09 11:17:31 +08:00
Sebastien Bourdeauducq
6098b1b853
fix previous commit
2024-09-06 11:32:08 +08:00
Sebastien Bourdeauducq
668ccb1c95
nac3core: expose inkwell and nac3parser
2024-09-06 11:06:26 +08:00
Sebastien Bourdeauducq
a3c624d69d
update all dependencies
2024-09-06 10:21:58 +08:00
Sébastien Bourdeauducq
bd06155f34
irrt: compatibility with pre-C23 compilers
2024-09-05 18:54:55 +08:00
David Mak
9c33c4209c
[core] Fix type of ndarray.element_type
...
Should be the element type of the NDArray itself, not the pointer to its
type.
2024-08-30 22:47:38 +08:00
Sebastien Bourdeauducq
122983f11c
flake: update dependencies
2024-08-30 14:45:38 +08:00
David Mak
71c3a65a31
[core] codegen/stmt: Fix obtaining return type of sret functions
2024-08-29 19:15:30 +08:00
David Mak
8c540d1033
[core] codegen/stmt: Add more casts for boolean types
2024-08-29 16:36:32 +08:00
David Mak
0cc60a3d33
[core] codegen/expr: Fix missing cast to i1
2024-08-29 16:36:32 +08:00
David Mak
a59c26aa99
[artiq] Fix RPC of ndarrays from host
2024-08-29 16:08:45 +08:00
David Mak
02d93b11d1
[meta] Update dependencies
2024-08-29 14:32:21 +08:00
lyken
59cad5bfe1
standalone: clang-format demo.c
2024-08-29 10:37:24 +08:00
lyken
4318f8de84
standalone: improve src/assignment.py
2024-08-29 10:33:58 +08:00
David Mak
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
lyken
c8dfdcfdea
standalone & artiq: remove class_names from resolver
2024-08-27 23:43:40 +08:00