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

Hw3 #416

Open
wants to merge 5 commits into
base: HW3
Choose a base branch
from
Open

Hw3 #416

wants to merge 5 commits into from

Conversation

xidexia
Copy link

@xidexia xidexia commented Nov 20, 2015

hw3

@xidexia
Copy link
Author

xidexia commented Nov 20, 2015

hw3

if (new_label != old_label) {
// CODE FOR PART 3 HERE
atomic_min(&labels[old_label],new_label);
// indicate there was a change this iteration.
// multiple threads might write this.
*(changed_flag) += 1;

Choose a reason for hiding this comment

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

The update to labels[y * w + x] should also be done using atomic_min.

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.

3 participants