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

.

parent 03736acb
No related branches found
No related tags found
1 merge request!210A whole bunch of optimization
Pipeline #201974 passed
...@@ -85,7 +85,6 @@ pub fn interprocedural_sroa( ...@@ -85,7 +85,6 @@ pub fn interprocedural_sroa(
param_nodes[idx].push(id); param_nodes[idx].push(id);
} }
} }
println!("{}", editor.func().name);
let success = editor.edit(|mut edit| { let success = editor.edit(|mut edit| {
for (idx, ids) in param_nodes.into_iter().enumerate() { for (idx, ids) in param_nodes.into_iter().enumerate() {
let new_indices = &old_param_type_map[idx]; let new_indices = &old_param_type_map[idx];
......
...@@ -48,8 +48,7 @@ fn run_euler( ...@@ -48,8 +48,7 @@ fn run_euler(
let normals_z = HerculesImmBox::from(normals.z.as_slice()); let normals_z = HerculesImmBox::from(normals.z.as_slice());
let mut runner = runner!(euler); let mut runner = runner!(euler);
let (density, momentum_x, momentum_y, momentum_z, energy) = let (density, momentum_x, momentum_y, momentum_z, energy) = async_std::task::block_on(async {
async_std::task::block_on(async {
runner runner
.run( .run(
nelr as u64, nelr as u64,
...@@ -123,8 +122,7 @@ fn run_pre_euler( ...@@ -123,8 +122,7 @@ fn run_pre_euler(
let normals_z = HerculesImmBox::from(normals.z.as_slice()); let normals_z = HerculesImmBox::from(normals.z.as_slice());
let mut runner = runner!(pre_euler); let mut runner = runner!(pre_euler);
let (density, momentum_x, momentum_y, momentum_z, energy) = let (density, momentum_x, momentum_y, momentum_z, energy) = async_std::task::block_on(async {
async_std::task::block_on(async {
runner runner
.run( .run(
nelr as u64, nelr as u64,
...@@ -189,15 +187,30 @@ fn compare_floats(xs: &Variables, ys: &Variables) -> bool { ...@@ -189,15 +187,30 @@ fn compare_floats(xs: &Variables, ys: &Variables) -> bool {
let ys_energy = ys.energy.as_slice(); let ys_energy = ys.energy.as_slice();
xs_density.len() == ys_density.len() xs_density.len() == ys_density.len()
&& xs_density.iter().zip(ys_density.iter()).all(|(x, y)| compare_float(*x, *y)) && xs_density
.iter()
.zip(ys_density.iter())
.all(|(x, y)| compare_float(*x, *y))
&& xs_momentum_x.len() == ys_momentum_x.len() && xs_momentum_x.len() == ys_momentum_x.len()
&& xs_momentum_x.iter().zip(ys_momentum_x.iter()).all(|(x, y)| compare_float(*x, *y)) && xs_momentum_x
.iter()
.zip(ys_momentum_x.iter())
.all(|(x, y)| compare_float(*x, *y))
&& xs_momentum_y.len() == ys_momentum_y.len() && xs_momentum_y.len() == ys_momentum_y.len()
&& xs_momentum_y.iter().zip(ys_momentum_y.iter()).all(|(x, y)| compare_float(*x, *y)) && xs_momentum_y
.iter()
.zip(ys_momentum_y.iter())
.all(|(x, y)| compare_float(*x, *y))
&& xs_momentum_z.len() == ys_momentum_z.len() && xs_momentum_z.len() == ys_momentum_z.len()
&& xs_momentum_z.iter().zip(ys_momentum_z.iter()).all(|(x, y)| compare_float(*x, *y)) && xs_momentum_z
.iter()
.zip(ys_momentum_z.iter())
.all(|(x, y)| compare_float(*x, *y))
&& xs_energy.len() == ys_energy.len() && xs_energy.len() == ys_energy.len()
&& xs_energy.iter().zip(ys_energy.iter()).all(|(x, y)| compare_float(*x, *y)) && xs_energy
.iter()
.zip(ys_energy.iter())
.all(|(x, y)| compare_float(*x, *y))
} }
pub fn cfd_harness(args: CFDInputs) { pub fn cfd_harness(args: CFDInputs) {
......
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