From 0cd36c22b1a41dc515d463f8f23a166c0d3918dc Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 15 Aug 2024 13:44:31 +0800 Subject: [PATCH] [artiq] WIP --- nac3artiq/src/codegen.rs | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index c86766e9..589b08a6 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -666,13 +666,13 @@ fn format_rpc_ret<'ctx>( // llvm_pdata_sizeof, // llvm_i1.const_zero(), // ); - call_memcpy_generic( - ctx, - ndarray.ptr_to_data(ctx), - buffer.base_ptr(ctx, generator), - llvm_pdata_sizeof, - llvm_i1.const_zero(), - ); + // call_memcpy_generic( + // ctx, + // ndarray.ptr_to_data(ctx), + // buffer.base_ptr(ctx, generator), + // llvm_pdata_sizeof, + // llvm_i1.const_zero(), + // ); let pbuffer_dims_begin = unsafe { buffer.ptr_offset_unchecked(ctx, generator, &llvm_pdata_sizeof, None) @@ -686,19 +686,19 @@ fn format_rpc_ret<'ctx>( ); // // TODO: Testing for buffer - // ndarray.create_data( - // ctx, - // llvm_elem_ty, - // call_ndarray_calc_size(generator, ctx, &ndarray.dim_sizes(), (None, None)), - // ); - // - // call_memcpy_generic( - // ctx, - // ndarray.data().base_ptr(ctx, generator), - // buffer.base_ptr(ctx, generator), - // llvm_usize.const_int(8, false), - // llvm_i1.const_zero(), - // ); + ndarray.create_data( + ctx, + llvm_elem_ty, + call_ndarray_calc_size(generator, ctx, &ndarray.dim_sizes(), (None, None)), + ); + + call_memcpy_generic( + ctx, + ndarray.data().base_ptr(ctx, generator), + buffer.base_ptr(ctx, generator), + llvm_usize.const_int(8, false), + llvm_i1.const_zero(), + ); Ok(()) },