From 5e7d86bd500aa3fe7da2a9e9108f5cc59dd5d888 Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 15 Aug 2024 05:15:46 +0800 Subject: [PATCH] WIP - [artiq] Test --- nac3artiq/src/codegen.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index f8ef5fae..72ec0319 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -603,9 +603,8 @@ fn format_rpc_ret<'ctx>( let dims_buf_sz = ctx.builder.build_int_mul(ndarray.load_ndims(ctx), llvm_usize_sizeof, "").unwrap(); - // let buffer_size = - // ctx.builder.build_int_add(dims_buf_sz, llvm_pdata_sizeof, "").unwrap(); - let buffer_size = llvm_usize.const_int(32, false); + let buffer_size = + ctx.builder.build_int_add(dims_buf_sz, llvm_pdata_sizeof, "").unwrap(); let buffer = ctx.builder.build_array_alloca(llvm_pi8, buffer_size, "rpc.buffer").unwrap(); @@ -723,8 +722,7 @@ fn format_rpc_ret<'ctx>( ctx, ndarray_pdata, buffer.base_ptr(ctx, generator), - llvm_usize.const_int(8, false), - // buffer_size, + buffer_size, llvm_i1.const_zero() );