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

Removes array_ref::{operator==, operator!=} #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jiawen
Copy link
Collaborator

@jiawen jiawen commented Jan 3, 2025

It costs O(n) and is easy to accidentally invoke when the caller really only cares about pointer and shape equality.

For content equality, use nda::equals().

It costs O(n) and is easy to accidentally invoke when the caller really
only cares about pointer and shape equality.

For content equality, use nda::equals().
@jiawen jiawen requested review from fbleibel-g and dsharlet January 3, 2025 17:25
NDARRAY_HOST_DEVICE split_iterator& operator++() {
return *this += 1;
}
NDARRAY_HOST_DEVICE split_iterator& operator++() { return *this += 1; }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

.clang-format did this. Happy to revert.

@jiawen jiawen changed the title Removes operator== and operator!= from array and array_ref. Removes array_ref::{operator==, operator!=} Jan 3, 2025
});
return result;
}
NDARRAY_HOST_DEVICE bool operator==(const array_ref& other) const { return !operator!=(other); }
Copy link
Owner

Choose a reason for hiding this comment

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

Does this build? array::operator== uses this.

It looks like travis stopped working (again).

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.

2 participants