mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix(rust): properly give an array of location to mlirBlockCreate
The MlirBlock constructor expects one location per input argument of the block.
This commit is contained in:
@@ -96,11 +96,14 @@ pub fn create_func_with_block(
|
||||
) -> MlirOperation {
|
||||
unsafe {
|
||||
// create the main block of the function
|
||||
let location = mlirLocationUnknownGet(context);
|
||||
let locations = (0..func_input_types.len())
|
||||
.into_iter()
|
||||
.map(|_| mlirLocationUnknownGet(context))
|
||||
.collect::<Vec<_>>();
|
||||
let func_block = mlirBlockCreate(
|
||||
func_input_types.len().try_into().unwrap(),
|
||||
func_input_types.as_ptr(),
|
||||
&location,
|
||||
locations.as_ptr(),
|
||||
);
|
||||
|
||||
// create region to hold the previously created block
|
||||
|
||||
Reference in New Issue
Block a user