pub fn build_barray_alloc<'c, H: HugrView<Node = Node>>(
ctx: &mut EmitFuncContext<'c, '_, H>,
ccg: &impl BorrowArrayCodegen,
elem_ty: BasicTypeEnum<'c>,
size: u64,
set_borrowed: bool,
) -> Result<(PointerValue<'c>, StructValue<'c>)>Expand description
Helper function to allocate a fat borrow array pointer.
Returns a pointer and a struct:
- The pointer points to the first element of the array (i.e. it is of type
elem_ty.ptr_type()). - The struct is the fat pointer that stores also the pointer to the mask and an additional offset (initialised to 0).