Skip to content

Commit 92259a4

Browse files
Clarify elementwise cmp reduces
Saying "elementwise (non-)equal" may suggest it returns a vector. The comments should be clear that it instead reduces to a scalar. Co-authored-by: Jacob Lifshay <[email protected]>
1 parent 71d4c36 commit 92259a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/core_simd/src/vector.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ where
709709
Mask::from_int_unchecked(tfvec)
710710
};
711711

712-
// Two vectors are equal if they are elementwise equal
712+
// Two vectors are equal if all elements are equal when compared elementwise
713713
mask.all()
714714
}
715715

@@ -722,7 +722,7 @@ where
722722
Mask::from_int_unchecked(tfvec)
723723
};
724724

725-
// Two vectors are non-equal if they are elementwise non-equal
725+
// Two vectors are non-equal if any elements are non-equal when compared elementwise
726726
mask.any()
727727
}
728728
}

0 commit comments

Comments
 (0)