Skip to content

Optimize all subgrids #202

@cschwan

Description

@cschwan

Right now ImportOnlySubgridV1 isn't optimized, as are other grids; these are supposedly already optimized. However, with #193 merged all grid types must be considered for optimization:

pineappl/pineappl/src/grid.rs

Lines 1105 to 1120 in 86d9a72

match subgrid {
SubgridEnum::LagrangeSubgridV1(grid) => {
let mut new_subgrid = LagrangeSparseSubgridV1::from(&*grid).into();
mem::swap(subgrid, &mut new_subgrid);
}
SubgridEnum::LagrangeSubgridV2(grid) => {
let mut new_subgrid = ImportOnlySubgridV2::from(&*grid).into();
mem::swap(subgrid, &mut new_subgrid);
}
SubgridEnum::EmptySubgridV1(_)
| SubgridEnum::LagrangeSparseSubgridV1(_)
| SubgridEnum::ImportOnlySubgridV1(_)
| SubgridEnum::ImportOnlySubgridV2(_) => {
// nothing to optimize here
}
SubgridEnum::NtupleSubgridV1(_) => todo!(),

With commit f79b9c6 we finally have a general interface to do this: Subgrid::indexed_iter.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions