Skip to content
Snippets Groups Projects

IP SROA Parameters

Merged rarbore2 requested to merge ip-sroa-params into main
1 unresolved thread
1 file
+ 76
46
Compare changes
  • Side-by-side
  • Inline
@@ -28,40 +28,55 @@ fn cfd_bench(c: &mut Criterion) {
@@ -28,40 +28,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements,
elements_surrounding_elements,
normals,
normals,
} = read_domain_geometry(data_file, block_size);
} = read_domain_geometry(data_file, block_size);
let mut variables = initialize_variables(nelr, ff_variable.as_slice());
let mut variables = initialize_variables(nelr, &ff_variable);
let mut variables = HerculesMutBox::from(variables.as_mut_slice());
 
let mut v_density = HerculesMutBox::from(variables.density.as_mut_slice());
 
let mut v_momentum_x = HerculesMutBox::from(variables.momentum.x.as_mut_slice());
 
let mut v_momentum_y = HerculesMutBox::from(variables.momentum.y.as_mut_slice());
 
let mut v_momentum_z = HerculesMutBox::from(variables.momentum.z.as_mut_slice());
 
let mut v_energy = HerculesMutBox::from(variables.energy.as_mut_slice());
 
let areas = HerculesImmBox::from(areas.as_slice());
let areas = HerculesImmBox::from(areas.as_slice());
let elements_surrounding_elements =
let elements_surrounding_elements =
HerculesImmBox::from(elements_surrounding_elements.as_slice());
HerculesImmBox::from(elements_surrounding_elements.as_slice());
let normals = HerculesImmBox::from(normals.as_slice());
let ff_variable = HerculesImmBox::from(ff_variable.as_slice());
let normals_x = HerculesImmBox::from(normals.x.as_slice());
let ff_fc_density_energy = vec![
let normals_y = HerculesImmBox::from(normals.y.as_slice());
ff_fc_density_energy.x,
let normals_z = HerculesImmBox::from(normals.z.as_slice());
ff_fc_density_energy.y,
ff_fc_density_energy.z,
];
let ff_fc_density_energy = HerculesImmBox::from(ff_fc_density_energy.as_slice());
let ff_fc_momentum_x = vec![ff_fc_momentum_x.x, ff_fc_momentum_x.y, ff_fc_momentum_x.z];
let ff_fc_momentum_x = HerculesImmBox::from(ff_fc_momentum_x.as_slice());
let ff_fc_momentum_y = vec![ff_fc_momentum_y.x, ff_fc_momentum_y.y, ff_fc_momentum_y.z];
let ff_fc_momentum_y = HerculesImmBox::from(ff_fc_momentum_y.as_slice());
let ff_fc_momentum_z = vec![ff_fc_momentum_z.x, ff_fc_momentum_z.y, ff_fc_momentum_z.z];
let ff_fc_momentum_z = HerculesImmBox::from(ff_fc_momentum_z.as_slice());
group.bench_function("cfd bench euler", |b| {
group.bench_function("cfd bench euler", |b| {
b.iter(|| {
b.iter(|| {
async_std::task::block_on(async {
async_std::task::block_on(async {
r.run(
r.run(
nelr as u64,
nelr as u64,
iterations as u64,
iterations as u64,
variables.to(),
v_density.to(),
 
v_momentum_x.to(),
 
v_momentum_y.to(),
 
v_momentum_z.to(),
 
v_energy.to(),
areas.to(),
areas.to(),
elements_surrounding_elements.to(),
elements_surrounding_elements.to(),
normals.to(),
normals_x.to(),
ff_variable.to(),
normals_y.to(),
ff_fc_density_energy.to(),
normals_z.to(),
ff_fc_momentum_x.to(),
ff_variable.density,
ff_fc_momentum_y.to(),
ff_variable.momentum.x,
ff_fc_momentum_z.to(),
ff_variable.momentum.y,
 
ff_variable.momentum.z,
 
ff_variable.energy,
 
ff_fc_density_energy.x,
 
ff_fc_density_energy.y,
 
ff_fc_density_energy.z,
 
ff_fc_momentum_x.x,
 
ff_fc_momentum_x.y,
 
ff_fc_momentum_x.z,
 
ff_fc_momentum_y.x,
 
ff_fc_momentum_y.y,
 
ff_fc_momentum_y.z,
 
ff_fc_momentum_z.x,
 
ff_fc_momentum_z.y,
 
ff_fc_momentum_z.z,
)
)
.await
.await
});
});
@@ -85,40 +100,55 @@ fn cfd_bench(c: &mut Criterion) {
@@ -85,40 +100,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements,
elements_surrounding_elements,
normals,
normals,
} = read_domain_geometry(data_file, block_size);
} = read_domain_geometry(data_file, block_size);
let mut variables = initialize_variables(nelr, ff_variable.as_slice());
let mut variables = initialize_variables(nelr, &ff_variable);
let mut variables = HerculesMutBox::from(variables.as_mut_slice());
 
let mut v_density = HerculesMutBox::from(variables.density.as_mut_slice());
 
let mut v_momentum_x = HerculesMutBox::from(variables.momentum.x.as_mut_slice());
 
let mut v_momentum_y = HerculesMutBox::from(variables.momentum.y.as_mut_slice());
 
let mut v_momentum_z = HerculesMutBox::from(variables.momentum.z.as_mut_slice());
 
let mut v_energy = HerculesMutBox::from(variables.energy.as_mut_slice());
 
let areas = HerculesImmBox::from(areas.as_slice());
let areas = HerculesImmBox::from(areas.as_slice());
let elements_surrounding_elements =
let elements_surrounding_elements =
HerculesImmBox::from(elements_surrounding_elements.as_slice());
HerculesImmBox::from(elements_surrounding_elements.as_slice());
let normals = HerculesImmBox::from(normals.as_slice());
let ff_variable = HerculesImmBox::from(ff_variable.as_slice());
let normals_x = HerculesImmBox::from(normals.x.as_slice());
let ff_fc_density_energy = vec![
let normals_y = HerculesImmBox::from(normals.y.as_slice());
ff_fc_density_energy.x,
let normals_z = HerculesImmBox::from(normals.z.as_slice());
ff_fc_density_energy.y,
ff_fc_density_energy.z,
];
let ff_fc_density_energy = HerculesImmBox::from(ff_fc_density_energy.as_slice());
let ff_fc_momentum_x = vec![ff_fc_momentum_x.x, ff_fc_momentum_x.y, ff_fc_momentum_x.z];
let ff_fc_momentum_x = HerculesImmBox::from(ff_fc_momentum_x.as_slice());
let ff_fc_momentum_y = vec![ff_fc_momentum_y.x, ff_fc_momentum_y.y, ff_fc_momentum_y.z];
let ff_fc_momentum_y = HerculesImmBox::from(ff_fc_momentum_y.as_slice());
let ff_fc_momentum_z = vec![ff_fc_momentum_z.x, ff_fc_momentum_z.y, ff_fc_momentum_z.z];
let ff_fc_momentum_z = HerculesImmBox::from(ff_fc_momentum_z.as_slice());
group.bench_function("cfd bench pre-euler", |b| {
group.bench_function("cfd bench pre-euler", |b| {
b.iter(|| {
b.iter(|| {
async_std::task::block_on(async {
async_std::task::block_on(async {
r.run(
r.run(
nelr as u64,
nelr as u64,
iterations as u64,
iterations as u64,
variables.to(),
v_density.to(),
 
v_momentum_x.to(),
 
v_momentum_y.to(),
 
v_momentum_z.to(),
 
v_energy.to(),
areas.to(),
areas.to(),
elements_surrounding_elements.to(),
elements_surrounding_elements.to(),
normals.to(),
normals_x.to(),
ff_variable.to(),
normals_y.to(),
ff_fc_density_energy.to(),
normals_z.to(),
ff_fc_momentum_x.to(),
ff_variable.density,
ff_fc_momentum_y.to(),
ff_variable.momentum.x,
ff_fc_momentum_z.to(),
ff_variable.momentum.y,
 
ff_variable.momentum.z,
 
ff_variable.energy,
 
ff_fc_density_energy.x,
 
ff_fc_density_energy.y,
 
ff_fc_density_energy.z,
 
ff_fc_momentum_x.x,
 
ff_fc_momentum_x.y,
 
ff_fc_momentum_x.z,
 
ff_fc_momentum_y.x,
 
ff_fc_momentum_y.y,
 
ff_fc_momentum_y.z,
 
ff_fc_momentum_z.x,
 
ff_fc_momentum_z.y,
 
ff_fc_momentum_z.z,
)
)
.await
.await
});
});
Loading