Skip to content
Snippets Groups Projects
Commit f3ddf1d2 authored by Russel Arbore's avatar Russel Arbore
Browse files

Handle outputs

parent 263b2e0c
No related branches found
No related tags found
1 merge request!208IP SROA Parameters
Pipeline #201954 failed
This commit is part of merge request !208. Comments created here will be created in the context of that merge request.
......@@ -14,8 +14,8 @@ simpl!(*);
inline(compute_step_factor, compute_flux, compute_flux_contribution, time_step);
delete-uncalled(*);
simpl!(*);
ip-sroa[false](*);
sroa[false](*);
ip-sroa[true](*);
sroa[true](*);
predication(*);
const-inline(*);
simpl!(*);
......
......@@ -14,8 +14,8 @@ simpl!(*);
inline(compute_step_factor, compute_flux, compute_flux_contributions, compute_flux_contribution, time_step);
delete-uncalled(*);
simpl!(*);
ip-sroa[false](*);
sroa[false](*);
ip-sroa[true](*);
sroa[true](*);
predication(*);
const-inline(*);
simpl!(*);
......
......@@ -55,8 +55,7 @@ fn run_euler(
let ff_fc_momentum_z = HerculesImmBox::from(ff_fc_momentum_z.as_slice());
let mut runner = runner!(euler);
HerculesMutBox::from(async_std::task::block_on(async {
let (density, x_m, y_m, z_m, energy) = async_std::task::block_on(async {
runner
.run(
nelr as u64,
......@@ -72,9 +71,20 @@ fn run_euler(
ff_fc_momentum_z.to(),
)
.await
}))
.as_slice()
.to_vec()
});
let total = vec![];
let density = HerculesMutBox::from(density).as_slice();
let x_m = HerculesMutBox::from(x_m).as_slice();
let y_m = HerculesMutBox::from(y_m).as_slice();
let z_m = HerculesMutBox::from(z_m).as_slice();
let energy = HerculesMutBox::from(energy).as_slice();
total.extend(density.into_iter().map(|id: &mut f32| *id));
total.extend(x_m.into_iter().map(|id: &mut f32| *id));
total.extend(y_m.into_iter().map(|id: &mut f32| *id));
total.extend(z_m.into_iter().map(|id: &mut f32| *id));
total.extend(energy.into_iter().map(|id: &mut f32| *id));
total
}
fn run_pre_euler(
......@@ -114,7 +124,7 @@ fn run_pre_euler(
let variables = variables.to();
HerculesMutBox::from(async_std::task::block_on(async {
let (density, x_m, y_m, z_m, energy) = async_std::task::block_on(async {
runner
.run(
nelr as u64,
......@@ -130,9 +140,20 @@ fn run_pre_euler(
ff_fc_momentum_z.to(),
)
.await
}))
.as_slice()
.to_vec()
});
let total = vec![];
let density = HerculesMutBox::from(density).as_slice();
let x_m = HerculesMutBox::from(x_m).as_slice();
let y_m = HerculesMutBox::from(y_m).as_slice();
let z_m = HerculesMutBox::from(z_m).as_slice();
let energy = HerculesMutBox::from(energy).as_slice();
total.extend(density.into_iter().map(|id: &mut f32| *id));
total.extend(x_m.into_iter().map(|id: &mut f32| *id));
total.extend(y_m.into_iter().map(|id: &mut f32| *id));
total.extend(z_m.into_iter().map(|id: &mut f32| *id));
total.extend(energy.into_iter().map(|id: &mut f32| *id));
total
}
fn compare_float(x: f32, y: f32) -> bool {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment