[artiq] WIP

This commit is contained in:
David Mak 2024-08-15 15:17:21 +08:00
parent cd61006436
commit fd85608d1c
1 changed files with 25 additions and 25 deletions

View File

@ -662,17 +662,17 @@ fn format_rpc_ret<'ctx>(
}, },
|generator, ctx| { |generator, ctx| {
let phi = phi.as_basic_value().into_pointer_value(); let phi = phi.as_basic_value().into_pointer_value();
let pbuffer_data_begin = unsafe { // let pbuffer_data_begin = unsafe {
ctx.builder.build_in_bounds_gep(phi, &[llvm_usize.const_int(0, false)], "") // ctx.builder.build_in_bounds_gep(phi, &[llvm_usize.const_int(0, false)], "")
} // }
.unwrap(); // .unwrap();
call_memcpy_generic( // call_memcpy_generic(
ctx, // ctx,
ndarray.ptr_to_data(ctx), // ndarray.ptr_to_data(ctx),
pbuffer_data_begin, // pbuffer_data_begin,
llvm_pdata_sizeof, // llvm_pdata_sizeof,
llvm_i1.const_zero(), // llvm_i1.const_zero(),
); // );
let pbuffer_dims_begin = let pbuffer_dims_begin =
unsafe { ctx.builder.build_in_bounds_gep(phi, &[llvm_pdata_sizeof], "") } unsafe { ctx.builder.build_in_bounds_gep(phi, &[llvm_pdata_sizeof], "") }
@ -685,20 +685,20 @@ fn format_rpc_ret<'ctx>(
llvm_i1.const_zero(), llvm_i1.const_zero(),
); );
// // TODO: Testing for buffer // TODO: Testing for buffer
// ndarray.create_data( ndarray.create_data(
// ctx, ctx,
// llvm_elem_ty, llvm_elem_ty,
// call_ndarray_calc_size(generator, ctx, &ndarray.dim_sizes(), (None, None)), call_ndarray_calc_size(generator, ctx, &ndarray.dim_sizes(), (None, None)),
// ); );
//
// call_memcpy_generic( call_memcpy_generic(
// ctx, ctx,
// ndarray.data().base_ptr(ctx, generator), ndarray.data().base_ptr(ctx, generator),
// buffer.base_ptr(ctx, generator), buffer.base_ptr(ctx, generator),
// llvm_usize.const_int(12, false), llvm_usize.const_int(12, false),
// llvm_i1.const_zero(), llvm_i1.const_zero(),
// ); );
Ok(()) Ok(())
}, },