1
0
forked from M-Labs/nac3

core: ndarray_from_ndlist_impl cast size_of to usize

This commit is contained in:
lyken 2024-07-04 12:24:52 +08:00
parent 83154ef8e1
commit d6565feed3

View File

@ -739,6 +739,8 @@ fn ndarray_from_ndlist_impl<'ctx, G: CodeGenerator + ?Sized>(
_ => {
let lst_len = src_lst.load_size(ctx, None);
let sizeof_elem = ctx.get_llvm_type(generator, elem_ty).size_of().unwrap();
let sizeof_elem = ctx.builder.build_int_cast(sizeof_elem, llvm_usize, "").unwrap();
let cpy_len = ctx
.builder
.build_int_mul(