Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lattice_reduce and lattice_fold #803

Merged
merged 4 commits into from
Jun 30, 2023

Conversation

zzlk
Copy link
Contributor

@zzlk zzlk commented Jun 30, 2023

fixes #752

@zzlk zzlk requested a review from MingweiSamuel June 30, 2023 19:40
Copy link
Member

@MingweiSamuel MingweiSamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

hydroflow_lang/src/graph/ops/lattice_reduce.rs Outdated Show resolved Hide resolved
hydroflow_lang/src/graph/ops/lattice_fold.rs Outdated Show resolved Hide resolved
let lat_type = &type_args[0];

let arguments = parse_quote_spanned! {lat_type.span()=> // Uses `lat_type.span()`!
<#lat_type>::default(), #root::lattices::Merge::merge_owned
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<#lat_type as ::std::default::Default>::default()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I wonder what is the difference in this case?

@zzlk zzlk merged commit 6323980 into hydro-project:main Jun 30, 2023
9 of 10 checks passed
nickjiang2378 pushed a commit to nickjiang2378/hydroflow that referenced this pull request Jan 24, 2024
* feat: add lattice_reduce and lattice_fold

* address comments

* simplify lattice fold a bit

* address comments
nickjiang2378 pushed a commit to nickjiang2378/hydroflow that referenced this pull request Jan 25, 2024
* feat: add lattice_reduce and lattice_fold

* address comments

* simplify lattice fold a bit

* address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lattice merge should probably use fold()
2 participants