Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Sep 15, 2023
1 parent c23a679 commit fbfdb76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ use luisa::prelude::*;
There are six basic types in EDSL. `bool`, `i32`, `u32`, `i64`, `u64`, `f32`. (`f64` support might be added to CPU backend).
For each type, there are two EDSL proxy objects `Expr<T>` and `Var<T>`. `Expr<T>` is an immutable object that represents a value. `Var<T>` is a mutable object that represents a variable. To load values from `Var<T>`, use `*var` and to obtain a mutable reference for assignment, use `v.get_mut()`. E.g. `*v.get_mut() = f(*u)`.

*Note*: Every DSL object in host code **must** be immutable due to Rust unable to overload. For example:
*Note*: Every DSL object in host code **must** be immutable due to Rust unable to overload `operator =`. For example:
```rust
// **no good**
let mut v = const_(0.0f32);
Expand Down

0 comments on commit fbfdb76

Please sign in to comment.