Skip to content

Commit baf2020

Browse files
committed
progress
1 parent ddc2805 commit baf2020

19 files changed

+8332
-2009
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,5 @@ cython_debug/
164164
# Added by cargo
165165

166166
/target
167-
Cargo.lock
167+
Cargo.lock
168+
scripts/cpp_lib.hpp

Cargo.lock

Lines changed: 4 additions & 204 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
pyo3 = { version = "0.22", optional = true }
8-
serde = { version = "1.0", features = ["derive"] }
9-
serde_json = "1.0"
7+
glam = { version = "0.29.2", optional = true }
8+
9+
10+
[build-dependencies]
1011

1112
[features]
12-
jit = ["pyo3"]
13+
default = ["glam"]
14+
glam = ["dep:glam"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import luisa_lang as lc
2525
## Basic Syntax
2626
### Difference from Python
2727
There are some notable differences between luisa_lang and Python:
28-
- Variables have value semantics by default. Use `inout` to indicate that an argument that is passed by reference.
28+
- Variables have value semantics by default. Use `byref` to indicate that an argument that is passed by reference.
2929
- Generic functions and structs are implemented via monomorphization (a.k.a instantiation) at compile time rather than via type erasure.
3030
- Overloading subscript operator and attribute access is different from Python. Only `__getitem__` and `__getattr__` are needed, which returns a local reference.
3131

@@ -55,9 +55,9 @@ a.x = 2.0
5555
lc.print(f'{a.x} {b.x}') # prints 2.0 1.0
5656
```
5757

58-
You can use `inout` to indicate that a variable is passed as a *local reference*. Assigning to an `inout` variable will update the original variable.
58+
You can use `byref` to indicate that a variable is passed as a *local reference*. Assigning to an `byref` variable will update the original variable.
5959
```python
60-
@luisa.func(a=inout, b=inout)
60+
@luisa.func(a=byref, b=byref)
6161
def swap(a: int, b: int):
6262
a, b = b, a
6363

0 commit comments

Comments
 (0)