Skip to content

Commit

Permalink
should fix aligned memory access
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Nov 10, 2023
1 parent 789a6a0 commit 731a977
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions luisa_compute/src/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,16 +543,15 @@ fn make_safe_node(node: NodeRef) -> SafeNodeRef {
/// check if the node belongs to the current kernel/callable
/// if not, capture the node recursively
fn process_potential_capture(node: SafeNodeRef) -> SafeNodeRef {
if node.node.is_user_data() {
return node;
}

with_recorder(|r| {
let cur_kernel_id = r.kernel_id;
assert_eq!(
cur_kernel_id, node.kernel_id,
"Referencing node from another kernel!"
);
if node.node.is_user_data() {
return node;
}
if r.inaccessible.borrow().contains(&node.node) {
panic!(
r#"Detected using node outside of its scope. It is possible that you use `RefCell` or `Cell` to store an `Expr<T>` or `Var<T>`
Expand Down

0 comments on commit 731a977

Please sign in to comment.