Skip to content
Snippets Groups Projects

Forkify fixes

Merged Xavier Routh requested to merge forkify-fixes into main
1 unresolved thread
6 files
+ 46
23
Compare changes
  • Side-by-side
  • Inline
Files
6
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::iter::{once, repeat, zip};
use either::Either;
@@ -432,20 +432,8 @@ pub fn no_reset_constant_collections(
init: _,
reduct: _,
} => {
// If the einsum for this reduce node is a full array
// comprehension, then every array element is written to, and
// the empty indices set (the whole collection) is considered as
// written to.
let (env, exprs) = reduce_einsum;
if let Some(expr) = exprs.get(&id)
&& let MathExpr::Comprehension(_, _) = env[expr.idx()]
{
ZeroLattice::top()
}
// Otherwise, meet the `init` and `reduct` inputs.
else {
ZeroLattice::meet(&inputs[0], &inputs[1])
}
ZeroLattice::meet(&inputs[0], &inputs[1])
}
Node::Write {
collect: _,
Loading