Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Oct 10, 2023
1 parent 89031ef commit b3c2674
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 21 deletions.
12 changes: 0 additions & 12 deletions luisa_compute/examples/fluid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,6 @@ fn main() {
}),
);

let init_grid = Kernel::<fn()>::new_async(&device, &|| {
let idx = index(dispatch_id().xy());
u0.var().write(idx, Float2::expr(0.0f32, 0.0f32));
u1.var().write(idx, Float2::expr(0.0f32, 0.0f32));

rho0.var().write(idx, 0.0f32);
rho1.var().write(idx, 0.0f32);

p0.var().write(idx, 0.0f32);
p1.var().write(idx, 0.0f32);
div.var().write(idx, 0.0f32);
});

let clear_pressure = Kernel::<fn()>::new_async(&device, &|| {
let idx = index(dispatch_id().xy());
Expand Down
3 changes: 0 additions & 3 deletions luisa_compute/examples/vecadd.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use std::env::current_exe;

use luisa::lang::types::vector::alias::*;
use luisa::prelude::*;
use luisa::runtime::{Kernel, KernelDef};
use luisa_compute as luisa;
#[tracked]
fn main() {
Expand Down
2 changes: 0 additions & 2 deletions luisa_compute/src/lang.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::any::Any;
use std::cell::{Cell, RefCell};
use std::fmt::Debug;
use std::ops::Deref;
use std::rc::Rc;
use std::sync::atomic::AtomicUsize;
use std::sync::Arc;
Expand Down Expand Up @@ -647,7 +646,6 @@ where
B: IndexWrite<Element = u32> + ToNode,
{
let index = index.as_expr().node().get();
let expor = expr.node().get();
let buffer = buffer.node().get();
let expr = expr.node().get();
__current_scope(|b| {
Expand Down
2 changes: 1 addition & 1 deletion luisa_compute/src/lang/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ops::Deref;
use crate::internal_prelude::*;

use super::soa::SoaMetadata;
use super::{process_potential_capture, with_recorder};
use super::with_recorder;

pub mod alignment;
pub mod array;
Expand Down
5 changes: 2 additions & 3 deletions luisa_compute/tests/misc.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use std::cell::RefCell;

use luisa::lang::ops::AddMaybeExpr;
use luisa::lang::types::array::VLArrayVar;
use luisa::lang::types::core::*;
use luisa::lang::types::dynamic::*;
use luisa::lang::types::vector::alias::*;
use luisa::lang::types::ExprProxy;
use luisa::prelude::*;
use luisa_compute as luisa;
use luisa_compute_api_types::StreamTag;
Expand Down Expand Up @@ -1101,6 +1098,7 @@ fn byte_buffer() {
}

#[test]
#[allow(unused_assignments)]
fn bindless_byte_buffer() {
let device = get_device();
let buf = device.create_byte_buffer(1024);
Expand All @@ -1119,6 +1117,7 @@ fn bindless_byte_buffer() {
let view = buf.view(cnt..cnt + s);
let bytes = unsafe { std::slice::from_raw_parts(&$v as *const $t as *const u8, s) };
view.copy_from(bytes);

cnt += s;
old
}};
Expand Down

0 comments on commit b3c2674

Please sign in to comment.